sRGB support in Ganesh. Several pieces:
authorbrianosman <brianosman@google.com>
Mon, 21 Mar 2016 13:55:37 +0000 (06:55 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 21 Mar 2016 13:55:37 +0000 (06:55 -0700)
commita6359365887048ef055196de75591311d7a015f0
tree03d964f0818dc7ba10cba8a6d0c7f919c45b0804
parentf8ee67edb8e5fed34bf4d5208bce89ea8be1ac1e
sRGB support in Ganesh. Several pieces:

sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
us to disable sRGB -> Linear conversion when reading textures. This gives
us an easy way to support "legacy" L32 mode. We disable decoding based on
the pixel config of the render target. Textures can override that behavior
(specifically for format-conversion draws where we want that behavior).

Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
internally, and the external format is BGR order, so TexImage calls will
swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
platforms.

Devices without sRGB support behave like they always have: conversion from
color type and profile type ignores sRGB and always returns linear pixel
configs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789663002

Review URL: https://codereview.chromium.org/1789663002
28 files changed:
example/HelloWorld.cpp
include/gpu/GrCaps.h
include/gpu/GrColor.h
include/gpu/GrTextureParams.h
include/gpu/GrTypes.h
include/gpu/SkGr.h
samplecode/SampleApp.cpp
src/core/SkImageCacherator.cpp
src/core/SkSpecialImage.cpp
src/effects/SkGpuBlurUtils.cpp
src/effects/SkTableColorFilter.cpp
src/effects/gradients/SkGradientShader.cpp
src/gpu/GrCaps.cpp
src/gpu/SkGpuDevice.cpp
src/gpu/SkGr.cpp
src/gpu/SkGrPixelRef.cpp
src/gpu/SkGrPriv.h
src/gpu/effects/GrConfigConversionEffect.cpp
src/gpu/effects/GrTextureStripAtlas.cpp
src/gpu/gl/GrGLCaps.cpp
src/gpu/gl/GrGLCaps.h
src/gpu/gl/GrGLDefines.h
src/gpu/gl/GrGLGpu.cpp
src/gpu/gl/GrGLGpu.h
src/gpu/gl/GrGLTexture.h
src/image/SkImage_Gpu.cpp
src/views/SkWindow.cpp
tests/ReadPixelsTest.cpp