Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Issue 1789663002: sRGB support in Ganesh. Several pieces: (Closed)

Created:
4 years, 9 months ago by Brian Osman
Modified:
4 years, 9 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

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 Committed: https://skia.googlesource.com/skia/+/a6359365887048ef055196de75591311d7a015f0

Patch Set 1 #

Patch Set 2 : Ensure sBGRA is unsupported on ES 2.0. Fix CreateRenderTarget. #

Total comments: 7

Patch Set 3 : Pass GrCaps to pixel config conversion, suppress srgb there. #

Patch Set 4 : Compile fix #

Patch Set 5 : Fixed WritePixelsTest failures. Copy/paste error. #

Patch Set 6 : Rebase #

Total comments: 2

Patch Set 7 : Remove GrSRGBPolicy, simplify bindTexture logic. #

Patch Set 8 : Fix compile error on CPU bots. #

Patch Set 9 : Fix more compile problems in non-GPU mode. #

Patch Set 10 : Squelch clang warnings about GrPixelConfig < kGrPixelConfigCnt #

Total comments: 1

Patch Set 11 : Workaround for bug in clang warning. #

Total comments: 1

Patch Set 12 : Review feedback. #

Patch Set 13 : Don't fail on non-8888 sRGB, just convert before uploading. Move gpu includes inside SUPPORT_GPU guards. #

Patch Set 14 : Rebase #

Patch Set 15 : Convert unsupported sRGB formats to 8888. #

Patch Set 16 : Trick raster into using linear blitters. #

Patch Set 17 : Rebase #

Patch Set 18 : Squelch assert when blurring sRGB #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -69 lines) Patch
M example/HelloWorld.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M include/gpu/GrCaps.h View 2 chunks +2 lines, -0 lines 0 comments Download
M include/gpu/GrColor.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +9 lines, -8 lines 0 comments Download
M include/gpu/GrTextureParams.h View 1 2 3 4 5 6 7 chunks +30 lines, -1 line 0 comments Download
M include/gpu/GrTypes.h View 1 2 3 4 5 6 7 chunks +23 lines, -0 lines 0 comments Download
M include/gpu/SkGr.h View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M samplecode/SampleApp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M src/core/SkImageCacherator.cpp View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M src/core/SkSpecialImage.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +3 lines, -2 lines 0 comments Download
M src/effects/SkGpuBlurUtils.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M src/effects/SkTableColorFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -1 line 0 comments Download
M src/effects/gradients/SkGradientShader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -1 line 0 comments Download
M src/gpu/GrCaps.cpp View 4 chunks +11 lines, -7 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 5 6 7 8 4 chunks +5 lines, -4 lines 0 comments Download
M src/gpu/SkGr.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 8 chunks +44 lines, -14 lines 0 comments Download
M src/gpu/SkGrPixelRef.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/SkGrPriv.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/effects/GrConfigConversionEffect.cpp View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M src/gpu/effects/GrTextureStripAtlas.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLCaps.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +0 lines, -3 lines 0 comments Download
M src/gpu/gl/GrGLCaps.cpp View 1 2 4 chunks +36 lines, -7 lines 0 comments Download
M src/gpu/gl/GrGLDefines.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLGpu.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M src/gpu/gl/GrGLGpu.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +31 lines, -4 lines 0 comments Download
M src/gpu/gl/GrGLTexture.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/image/SkImage_Gpu.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download
M src/views/SkWindow.cpp View 1 1 chunk +6 lines, -2 lines 0 comments Download
M tests/ReadPixelsTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 61 (29 generated)
Brian Osman
https://codereview.chromium.org/1789663002/diff/20001/src/gpu/gl/GrGLGpu.cpp File src/gpu/gl/GrGLGpu.cpp (right): https://codereview.chromium.org/1789663002/diff/20001/src/gpu/gl/GrGLGpu.cpp#newcode2596 src/gpu/gl/GrGLGpu.cpp:2596: ElevateDrawPreference(drawPreference, kRequireDraw_DrawPreference); This block of code may make no ...
4 years, 9 months ago (2016-03-11 17:15:25 UTC) #3
Brian Osman
4 years, 9 months ago (2016-03-11 17:15:26 UTC) #4
bsalomon
https://codereview.chromium.org/1789663002/diff/20001/src/gpu/SkGr.cpp File src/gpu/SkGr.cpp (right): https://codereview.chromium.org/1789663002/diff/20001/src/gpu/SkGr.cpp#newcode373 src/gpu/SkGr.cpp:373: ? kSRGBA_8888_GrPixelConfig Should we fail if pt is srgb ...
4 years, 9 months ago (2016-03-11 23:16:20 UTC) #5
Brian Osman
Fixed various problems. https://codereview.chromium.org/1789663002/diff/20001/src/gpu/SkGr.cpp File src/gpu/SkGr.cpp (right): https://codereview.chromium.org/1789663002/diff/20001/src/gpu/SkGr.cpp#newcode373 src/gpu/SkGr.cpp:373: ? kSRGBA_8888_GrPixelConfig On 2016/03/11 23:16:19, bsalomon ...
4 years, 9 months ago (2016-03-17 14:32:06 UTC) #7
bsalomon
https://codereview.chromium.org/1789663002/diff/100001/include/gpu/GrTypes.h File include/gpu/GrTypes.h (right): https://codereview.chromium.org/1789663002/diff/100001/include/gpu/GrTypes.h#newcode406 include/gpu/GrTypes.h:406: kUnknown_GrSRGBPolicy, What does unknown mean? Can we get away ...
4 years, 9 months ago (2016-03-17 14:54:48 UTC) #8
Brian Osman
https://codereview.chromium.org/1789663002/diff/100001/include/gpu/GrTypes.h File include/gpu/GrTypes.h (right): https://codereview.chromium.org/1789663002/diff/100001/include/gpu/GrTypes.h#newcode406 include/gpu/GrTypes.h:406: kUnknown_GrSRGBPolicy, On 2016/03/17 14:54:47, bsalomon wrote: > What does ...
4 years, 9 months ago (2016-03-17 15:01:22 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/120001
4 years, 9 months ago (2016-03-17 16:05:13 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/7092)
4 years, 9 months ago (2016-03-17 16:06:44 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/140001
4 years, 9 months ago (2016-03-17 16:18:53 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/7107) Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on ...
4 years, 9 months ago (2016-03-17 16:21:44 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/160001
4 years, 9 months ago (2016-03-17 17:00:12 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Ubuntu-Clang-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-Clang-x86_64-Debug-Trybot/builds/7131)
4 years, 9 months ago (2016-03-17 17:03:53 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/180001
4 years, 9 months ago (2016-03-17 18:02:58 UTC) #23
Brian Osman
https://codereview.chromium.org/1789663002/diff/180001/gyp/common_conditions.gypi File gyp/common_conditions.gypi (right): https://codereview.chromium.org/1789663002/diff/180001/gyp/common_conditions.gypi#newcode235 gyp/common_conditions.gypi:235: '-Wno-tautological-compare', Is this okay? Without this, clang is warning ...
4 years, 9 months ago (2016-03-17 18:07:03 UTC) #24
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-17 18:23:50 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/200001
4 years, 9 months ago (2016-03-17 18:32:16 UTC) #28
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
4 years, 9 months ago (2016-03-17 18:32:18 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: skia_presubmit-Trybot on client.skia.fyi (JOB_FAILED, http://build.chromium.org/p/client.skia.fyi/builders/skia_presubmit-Trybot/builds/7755)
4 years, 9 months ago (2016-03-17 18:34:09 UTC) #31
bsalomon
On 2016/03/17 18:07:03, Brian Osman wrote: > https://codereview.chromium.org/1789663002/diff/180001/gyp/common_conditions.gypi > File gyp/common_conditions.gypi (right): > > https://codereview.chromium.org/1789663002/diff/180001/gyp/common_conditions.gypi#newcode235 ...
4 years, 9 months ago (2016-03-17 18:47:45 UTC) #32
bsalomon
lgtm https://codereview.chromium.org/1789663002/diff/200001/src/gpu/gl/GrGLGpu.h File src/gpu/gl/GrGLGpu.h (right): https://codereview.chromium.org/1789663002/diff/200001/src/gpu/gl/GrGLGpu.h#newcode62 src/gpu/gl/GrGLGpu.h:62: void bindTexture(int unitIdx, const GrTextureParams& params, bool allowSRGB, ...
4 years, 9 months ago (2016-03-17 18:51:19 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/220001
4 years, 9 months ago (2016-03-17 19:11:59 UTC) #36
commit-bot: I haz the power
Committed patchset #12 (id:220001) as https://skia.googlesource.com/skia/+/9e3f1bf4e5cd8fc59554f986f36d6b034e99f9eb
4 years, 9 months ago (2016-03-17 19:26:40 UTC) #38
Brian Osman
A revert of this CL (patchset #12 id:220001) has been created in https://codereview.chromium.org/1814533003/ by brianosman@google.com. ...
4 years, 9 months ago (2016-03-17 20:01:07 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/260001
4 years, 9 months ago (2016-03-18 14:37:23 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/260001
4 years, 9 months ago (2016-03-18 14:49:24 UTC) #46
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/320001
4 years, 9 months ago (2016-03-18 19:55:12 UTC) #49
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-18 20:14:31 UTC) #51
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/340001
4 years, 9 months ago (2016-03-18 21:37:02 UTC) #53
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-18 21:56:46 UTC) #55
Brian Osman
Various improvements since the last attempt: Non-8888 sRGB textures are expanded to 8888, some further ...
4 years, 9 months ago (2016-03-18 23:46:28 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1789663002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1789663002/340001
4 years, 9 months ago (2016-03-21 13:44:28 UTC) #59
commit-bot: I haz the power
4 years, 9 months ago (2016-03-21 13:55:49 UTC) #61
Message was sent while issue was closed.
Committed patchset #18 (id:340001) as
https://skia.googlesource.com/skia/+/a6359365887048ef055196de75591311d7a015f0

Powered by Google App Engine
This is Rietveld 408576698