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

Issue 1845283003: Gamma-correctness pushed into Skia, top-down. (Closed)

Created:
4 years, 8 months ago by Brian Osman
Modified:
4 years, 8 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

SkSurfaceProps now has a gamma-correct ("AllowSRGBInputs") flag. That's propagated in a few places so that the backend can do the right thing for L32 vs S32 mode. Also added SkSurfaceProps to SkSpecialImage, so that Image -> Surface conversion can preserve the desired behavior during filtering. Many small changes, including a bunch of comments about places where we may be losing information right now. My approach was to ensure that if anything fails, it will always fall back to "legacy" mode - gamma-correctness is opt-in, so I'll just have to feed things through as missing cases are exposed. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838953007 Committed: https://skia.googlesource.com/skia/+/898235c4864df66aa7f6d32bc2a8b8551040ce1e

Patch Set 1 #

Patch Set 2 : Progress on GrPaint strategy. gamma GM saveLayers and sRGB textures broken. #

Patch Set 3 : Fix SampleApp #

Patch Set 4 : Rebase #

Patch Set 5 : Compile fix for DM #

Patch Set 6 : Fixes for image filters #

Patch Set 7 : Rebase #

Patch Set 8 : Undo odd change to GrBlurUtils - no longer needed #

Total comments: 6

Patch Set 9 : Remove helper function for old pixel-config method of enabling decode #

Total comments: 37

Patch Set 10 : Fixed GMs that make off-screen surfaces. Addressed a bunch of review feedback. #

Patch Set 11 : Rebase #

Patch Set 12 : Rebase #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+315 lines, -127 lines) Patch
M dm/DM.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -4 lines 0 comments Download
M dm/DMGpuSupport.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M gm/constcolorprocessor.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M gm/dftext.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -2 lines 0 comments Download
M gm/surface.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +10 lines, -3 lines 0 comments Download
M gm/textblobgeometrychange.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -2 lines 0 comments Download
M gm/textblobmixedsizes.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -2 lines 0 comments Download
M gm/textblobrandomfont.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -2 lines 0 comments Download
M gm/xfermodes3.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M include/core/SkCanvas.h View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M include/core/SkDevice.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -4 lines 0 comments Download
M include/core/SkImageInfo.h View 1 chunk +10 lines, -0 lines 0 comments Download
M include/core/SkSurfaceProps.h View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -0 lines 0 comments Download
M include/gpu/GrDrawContext.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M include/gpu/GrPaint.h View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -0 lines 0 comments Download
M include/gpu/GrTypes.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -10 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +14 lines, -1 line 0 comments Download
M src/core/SkDevice.cpp View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -3 lines 0 comments Download
M src/core/SkSpecialImage.h View 1 2 3 4 5 6 chunks +17 lines, -12 lines 0 comments Download
M src/core/SkSpecialImage.cpp View 1 2 3 4 5 16 chunks +50 lines, -24 lines 0 comments Download
M src/core/SkSpecialSurface.cpp View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M src/effects/SkBlurImageFilter.cpp View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M src/effects/SkBlurMaskFilter.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M src/effects/SkDisplacementMapEffect.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/SkGpuBlurUtils.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M src/effects/SkGpuBlurUtils.cpp View 1 2 3 4 5 6 7 8 9 9 chunks +11 lines, -3 lines 0 comments Download
M src/effects/SkImageSource.cpp View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 1 comment Download
M src/effects/SkLightingImageFilter.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 1 comment Download
M src/effects/SkMorphologyImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +4 lines, -2 lines 2 comments Download
M src/effects/SkXfermodeImageFilter.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 1 comment Download
M src/gpu/GrBlurUtils.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M src/gpu/GrContext.cpp View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M src/gpu/GrLayerHoister.cpp View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M src/gpu/GrPaint.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrPipeline.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M src/gpu/GrPipeline.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/gpu/GrPipelineBuilder.h View 1 2 chunks +8 lines, -1 line 0 comments Download
M src/gpu/GrPipelineBuilder.cpp View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 17 chunks +40 lines, -20 lines 0 comments Download
M src/gpu/SkGpuDevice_drawTexture.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/SkGr.cpp View 1 5 chunks +13 lines, -6 lines 0 comments Download
M src/gpu/SkGrPriv.h View 1 5 chunks +7 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLGpu.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -4 lines 0 comments Download
M src/gpu/text/GrAtlasTextContext.cpp View 1 2 chunks +3 lines, -2 lines 0 comments Download
M src/gpu/text/GrStencilAndCoverTextContext.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M src/views/SkWindow.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -3 lines 0 comments Download
M tools/gpu/GrTest.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 26 (11 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845283003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845283003/140001
4 years, 8 months ago (2016-04-04 20:14:44 UTC) #5
Brian Osman
There are obviously still gaps, but all GMs produce the same results in gpusrgb config ...
4 years, 8 months ago (2016-04-04 20:28:22 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-04 20:30:34 UTC) #9
reed1
https://codereview.chromium.org/1845283003/diff/140001/include/core/SkCanvas.h File include/core/SkCanvas.h (right): https://codereview.chromium.org/1845283003/diff/140001/include/core/SkCanvas.h#newcode127 include/core/SkCanvas.h:127: * (cpu or gpu), then this will return null. ...
4 years, 8 months ago (2016-04-04 21:12:30 UTC) #11
Brian Osman
https://codereview.chromium.org/1845283003/diff/140001/include/core/SkCanvas.h File include/core/SkCanvas.h (right): https://codereview.chromium.org/1845283003/diff/140001/include/core/SkCanvas.h#newcode127 include/core/SkCanvas.h:127: * (cpu or gpu), then this will return null. ...
4 years, 8 months ago (2016-04-04 21:42:35 UTC) #12
robertphillips
https://codereview.chromium.org/1845283003/diff/160001/include/core/SkCanvas.h File include/core/SkCanvas.h (right): https://codereview.chromium.org/1845283003/diff/160001/include/core/SkCanvas.h#newcode125 include/core/SkCanvas.h:125: /** move these over 1 ' ' ? https://codereview.chromium.org/1845283003/diff/160001/include/core/SkSurfaceProps.h ...
4 years, 8 months ago (2016-04-05 12:54:34 UTC) #13
bsalomon
https://codereview.chromium.org/1845283003/diff/160001/include/core/SkDevice.h File include/core/SkDevice.h (right): https://codereview.chromium.org/1845283003/diff/160001/include/core/SkDevice.h#newcode396 include/core/SkDevice.h:396: friend class GrLayerHoister; // for surfaceProps Wonder why the ...
4 years, 8 months ago (2016-04-05 13:24:01 UTC) #14
Brian Osman
https://codereview.chromium.org/1845283003/diff/160001/include/core/SkCanvas.h File include/core/SkCanvas.h (right): https://codereview.chromium.org/1845283003/diff/160001/include/core/SkCanvas.h#newcode125 include/core/SkCanvas.h:125: /** On 2016/04/05 12:54:34, robertphillips wrote: > move these ...
4 years, 8 months ago (2016-04-05 15:36:42 UTC) #15
Brian Osman
We were chatting about what exactly the new flag should *do*, so I could document ...
4 years, 8 months ago (2016-04-05 15:47:07 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845283003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845283003/200001
4 years, 8 months ago (2016-04-05 15:52:03 UTC) #18
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-05 16:03:01 UTC) #20
Brian Osman
Review feedback should be addressed. Look good?
4 years, 8 months ago (2016-04-05 20:09:36 UTC) #21
bsalomon
lgtm, some more comments on some of the SRGBTODOs (though not looking for any changes ...
4 years, 8 months ago (2016-04-06 13:19:28 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845283003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845283003/220001
4 years, 8 months ago (2016-04-06 13:45:30 UTC) #24
commit-bot: I haz the power
4 years, 8 months ago (2016-04-06 14:38:27 UTC) #26
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://skia.googlesource.com/skia/+/898235c4864df66aa7f6d32bc2a8b8551040ce1e

Powered by Google App Engine
This is Rietveld 408576698