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

Issue 2154753003: Introduce GrColorSpaceXform, for gamut conversion on textures (Closed)

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

Introduce GrColorSpaceXform, for gamut conversion on textures GrTextureAccess optionally includes an instance, computed from the src and dst color spaces. In all common cases (no color space for either src or dst, or same color space for both), no object is allocated. This change is orthogonal to my attempts to get color space attached to render targets - regardless of how we choose to do that, this will give us the source color space at all points where we are connecting src to dst. There are many dangling injection points where I've been inserting nullptr, but I have a record of all of them. Additionally, there are now three places (the most common simple paths for bitmap/image rendering) where things are plumbed enough that I expect to have access to the dst color space (all marked with XFORMTODO). In addition to getting the dst color space, I need to inject shader code and uniform uploading for appendTextureLookup and friends. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154753003 Committed: https://skia.googlesource.com/skia/+/54f30c13fc0a5d89797fc9be5f0fb1050d96b6f4

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rebase, add matrix ~= identity check #

Patch Set 3 : GrBicubicEffect conversion code injected into shader #

Patch Set 4 : Only plumb to effect - no need to store xform on GrTextureAccess #

Total comments: 5

Patch Set 5 : More progress & refactoring #

Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -89 lines) Patch
M gm/texdata.cpp View 1 chunk +1 line, -1 line 0 comments Download
M gm/texturedomaineffect.cpp View 1 chunk +1 line, -1 line 0 comments Download
M gyp/gpu.gypi View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download
A include/gpu/GrColorSpaceXform.h View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
M include/gpu/GrPaint.h View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M src/core/SkBitmapProcShader.cpp View 1 chunk +5 lines, -3 lines 0 comments Download
M src/effects/SkBlurMaskFilter.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkGpuBlurUtils.cpp View 3 chunks +3 lines, -2 lines 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkMagnifierImageFilter.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkXfermodeImageFilter.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/GrBlurUtils.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrClipMaskManager.cpp View 1 chunk +1 line, -0 lines 0 comments Download
A src/gpu/GrColorSpaceXform.cpp View 1 2 3 4 1 chunk +58 lines, -0 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrPaint.cpp View 1 chunk +13 lines, -5 lines 0 comments Download
M src/gpu/GrPipelineBuilder.h View 1 chunk +6 lines, -4 lines 0 comments Download
M src/gpu/GrSWMaskHelper.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrTextureParamsAdjuster.cpp View 1 2 3 6 chunks +22 lines, -10 lines 0 comments Download
M src/gpu/GrTextureToYUVPlanes.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 3 chunks +12 lines, -6 lines 0 comments Download
M src/gpu/effects/Gr1DKernelEffect.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/effects/GrBicubicEffect.h View 1 2 4 chunks +27 lines, -15 lines 0 comments Download
M src/gpu/effects/GrBicubicEffect.cpp View 1 2 3 4 9 chunks +28 lines, -9 lines 0 comments Download
M src/gpu/effects/GrConfigConversionEffect.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/effects/GrMatrixConvolutionEffect.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/effects/GrSimpleTextureEffect.h View 2 chunks +13 lines, -5 lines 0 comments Download
M src/gpu/effects/GrSimpleTextureEffect.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/effects/GrSingleTextureEffect.h View 1 2 3 3 chunks +7 lines, -3 lines 0 comments Download
M src/gpu/effects/GrSingleTextureEffect.cpp View 1 2 3 1 chunk +9 lines, -3 lines 0 comments Download
M src/gpu/effects/GrTextureDomain.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/gpu/effects/GrTextureDomain.cpp View 3 chunks +7 lines, -3 lines 0 comments Download
A src/gpu/glsl/GrGLSLColorSpaceXformHelper.h View 1 2 3 4 1 chunk +39 lines, -0 lines 0 comments Download
M src/image/SkImageShader.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/SRGBMipMapTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tools/gpu/GrTest.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 30 (18 generated)
Brian Osman
The most interesting parts of this are: - GrColorSpaceXform.h/cpp - GrTextureAccess.h - GrTextureParamsAdjuster.cpp - SkBitmapProcShader.cpp ...
4 years, 5 months ago (2016-07-15 14:55:45 UTC) #2
Brian Osman
The most interesting parts of this are: - GrColorSpaceXform.h/cpp - GrTextureAccess.h - GrTextureParamsAdjuster.cpp - SkBitmapProcShader.cpp ...
4 years, 5 months ago (2016-07-15 14:56:27 UTC) #4
bsalomon
https://codereview.chromium.org/2154753003/diff/1/include/gpu/GrTextureAccess.h File include/gpu/GrTextureAccess.h (right): https://codereview.chromium.org/2154753003/diff/1/include/gpu/GrTextureAccess.h#newcode22 include/gpu/GrTextureAccess.h:22: class GrTextureAccess : public SkNoncopyable { What do you ...
4 years, 5 months ago (2016-07-15 15:09:25 UTC) #9
Brian Osman
https://codereview.chromium.org/2154753003/diff/1/include/gpu/GrTextureAccess.h File include/gpu/GrTextureAccess.h (right): https://codereview.chromium.org/2154753003/diff/1/include/gpu/GrTextureAccess.h#newcode22 include/gpu/GrTextureAccess.h:22: class GrTextureAccess : public SkNoncopyable { On 2016/07/15 15:09:24, ...
4 years, 5 months ago (2016-07-15 15:29:02 UTC) #10
Brian Osman
GrBicubicEffect now works. I'll probably end up factoring some of the shader-injection code into helper ...
4 years, 5 months ago (2016-07-15 19:44:30 UTC) #15
bsalomon
https://codereview.chromium.org/2154753003/diff/60001/src/gpu/GrColorSpaceXform.cpp File src/gpu/GrColorSpaceXform.cpp (right): https://codereview.chromium.org/2154753003/diff/60001/src/gpu/GrColorSpaceXform.cpp#newcode16 src/gpu/GrColorSpaceXform.cpp:16: return Is this something we should compute and store ...
4 years, 5 months ago (2016-07-18 13:56:36 UTC) #16
Brian Osman
Replying to Brian's last comments, and adding Matt re: caching inverse XYZ on SkColorSpace (perhaps ...
4 years, 5 months ago (2016-07-18 14:07:34 UTC) #18
bsalomon
lgtm
4 years, 5 months ago (2016-07-18 15:16:15 UTC) #19
Brian Osman
Thanks for the lgtm. Just wanted to point out my latest revision before I land ...
4 years, 5 months ago (2016-07-18 15:24:11 UTC) #20
msarett
https://codereview.chromium.org/2154753003/diff/60001/src/gpu/GrColorSpaceXform.cpp File src/gpu/GrColorSpaceXform.cpp (right): https://codereview.chromium.org/2154753003/diff/60001/src/gpu/GrColorSpaceXform.cpp#newcode16 src/gpu/GrColorSpaceXform.cpp:16: return On 2016/07/18 14:07:33, Brian Osman wrote: > On ...
4 years, 5 months ago (2016-07-18 15:39:40 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2154753003/80001
4 years, 5 months ago (2016-07-18 17:52:51 UTC) #28
commit-bot: I haz the power
4 years, 5 months ago (2016-07-18 17:53:56 UTC) #30
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://skia.googlesource.com/skia/+/54f30c13fc0a5d89797fc9be5f0fb1050d96b6f4

Powered by Google App Engine
This is Rietveld 408576698