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

Issue 608253002: Add isSingleComponent bool to getConstantColorComponent (Closed)

Created:
6 years, 2 months ago by egdaniel
Modified:
6 years, 2 months ago
Reviewers:
bsalomon, joshua.litt, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Add isSingleComponent bool to getConstantColorComponent Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components. BUG=skia: Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b Committed: https://skia.googlesource.com/skia/+/1a8ecdfb73a15de600d5779b75d7c4b61863c50b

Patch Set 1 #

Total comments: 4

Patch Set 2 : Set isSingleComponent to false in effects #

Patch Set 3 : Nits #

Patch Set 4 : Change name and use struct #

Patch Set 5 : Update comment and nits #

Total comments: 12

Patch Set 6 : Fix from reviewer comments and add premul validation check #

Patch Set 7 : Fix isSolidWhite #

Unified diffs Side-by-side diffs Delta from patch set Stats (+440 lines, -332 lines) Patch
M include/gpu/GrProcessor.h View 1 2 3 4 5 6 2 chunks +43 lines, -5 lines 0 comments Download
M src/core/SkXfermode.cpp View 1 2 3 4 5 2 chunks +5 lines, -5 lines 0 comments Download
M src/effects/SkAlphaThresholdFilter.cpp View 1 2 3 4 5 3 chunks +7 lines, -7 lines 0 comments Download
M src/effects/SkArithmeticMode.cpp View 1 2 3 4 5 3 chunks +5 lines, -4 lines 0 comments Download
M src/effects/SkBlurMaskFilter.cpp View 1 2 3 4 5 6 chunks +10 lines, -9 lines 0 comments Download
M src/effects/SkColorFilters.cpp View 1 2 3 4 5 3 chunks +8 lines, -7 lines 0 comments Download
M src/effects/SkColorMatrixFilter.cpp View 1 2 3 4 5 2 chunks +45 lines, -45 lines 0 comments Download
M src/effects/SkDisplacementMapEffect.cpp View 1 2 3 4 5 2 chunks +5 lines, -5 lines 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 2 3 4 5 1 chunk +6 lines, -6 lines 0 comments Download
M src/effects/SkLumaColorFilter.cpp View 1 2 3 4 5 2 chunks +7 lines, -7 lines 0 comments Download
M src/effects/SkMagnifierImageFilter.cpp View 1 2 3 4 5 3 chunks +5 lines, -4 lines 0 comments Download
M src/effects/SkMorphologyImageFilter.cpp View 1 2 3 4 5 3 chunks +5 lines, -3 lines 0 comments Download
M src/effects/SkPerlinNoiseShader.cpp View 1 2 3 4 5 2 chunks +5 lines, -4 lines 0 comments Download
M src/effects/SkTableColorFilter.cpp View 1 2 3 4 5 2 chunks +9 lines, -8 lines 0 comments Download
M src/effects/gradients/SkGradientShader.cpp View 1 2 3 4 5 1 chunk +5 lines, -4 lines 0 comments Download
M src/effects/gradients/SkGradientShaderPriv.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/GrAAConvexPathRenderer.cpp View 1 2 3 4 5 2 chunks +5 lines, -5 lines 0 comments Download
M src/gpu/GrAARectRenderer.cpp View 1 2 3 4 5 4 chunks +10 lines, -10 lines 0 comments Download
M src/gpu/GrDrawState.cpp View 1 2 3 4 5 2 chunks +27 lines, -28 lines 0 comments Download
M src/gpu/GrOptDrawState.cpp View 1 2 3 4 5 2 chunks +12 lines, -11 lines 0 comments Download
M src/gpu/GrOvalRenderer.cpp View 1 2 3 4 5 6 chunks +15 lines, -15 lines 0 comments Download
M src/gpu/GrPaint.cpp View 1 2 3 4 5 2 chunks +14 lines, -10 lines 0 comments Download
M src/gpu/GrProcessor.cpp View 1 2 3 4 5 1 chunk +42 lines, -0 lines 0 comments Download
M src/gpu/effects/GrBezierEffect.h View 1 2 3 4 5 6 chunks +15 lines, -15 lines 0 comments Download
M src/gpu/effects/GrBicubicEffect.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M src/gpu/effects/GrBicubicEffect.cpp View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M src/gpu/effects/GrConfigConversionEffect.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/effects/GrConfigConversionEffect.cpp View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M src/gpu/effects/GrConvexPolyEffect.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/effects/GrConvexPolyEffect.cpp View 1 2 3 4 5 3 chunks +14 lines, -13 lines 0 comments Download
M src/gpu/effects/GrConvolutionEffect.h View 1 2 3 4 5 2 chunks +7 lines, -6 lines 0 comments Download
M src/gpu/effects/GrCustomCoordsTextureEffect.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/effects/GrCustomCoordsTextureEffect.cpp View 1 2 3 4 5 1 chunk +5 lines, -6 lines 0 comments Download
M src/gpu/effects/GrDashingEffect.cpp View 1 2 3 4 5 6 chunks +10 lines, -8 lines 0 comments Download
M src/gpu/effects/GrDistanceFieldTextureEffect.h View 1 2 3 4 5 4 chunks +4 lines, -3 lines 0 comments Download
M src/gpu/effects/GrDistanceFieldTextureEffect.cpp View 1 2 3 4 5 2 chunks +12 lines, -12 lines 0 comments Download
M src/gpu/effects/GrDitherEffect.cpp View 1 2 3 4 5 2 chunks +5 lines, -4 lines 0 comments Download
M src/gpu/effects/GrMatrixConvolutionEffect.h View 1 2 3 4 5 2 chunks +6 lines, -6 lines 0 comments Download
M src/gpu/effects/GrOvalEffect.cpp View 1 2 3 4 5 6 chunks +10 lines, -8 lines 0 comments Download
M src/gpu/effects/GrRRectEffect.cpp View 1 2 3 4 5 6 chunks +10 lines, -8 lines 0 comments Download
M src/gpu/effects/GrSimpleTextureEffect.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/effects/GrSimpleTextureEffect.cpp View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M src/gpu/effects/GrSingleTextureEffect.h View 1 2 3 4 5 1 chunk +5 lines, -6 lines 0 comments Download
M src/gpu/effects/GrTextureDomain.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M src/gpu/effects/GrTextureDomain.cpp View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download
M src/gpu/effects/GrYUVtoRGBEffect.cpp View 1 2 3 4 5 2 chunks +7 lines, -7 lines 0 comments Download
M tests/GpuColorFilterTest.cpp View 1 2 3 4 5 1 chunk +8 lines, -6 lines 0 comments Download

Messages

Total messages: 20 (4 generated)
egdaniel
6 years, 2 months ago (2014-09-29 14:37:49 UTC) #2
joshua.litt
lgtm with nit https://codereview.chromium.org/608253002/diff/1/src/gpu/GrDrawState.cpp File src/gpu/GrDrawState.cpp (right): https://codereview.chromium.org/608253002/diff/1/src/gpu/GrDrawState.cpp#newcode799 src/gpu/GrDrawState.cpp:799: processor->getConstantColorComponents(&coverage, &coverageComponentFlags, &isSingleComponent); Newline
6 years, 2 months ago (2014-09-29 15:22:08 UTC) #3
bsalomon
Don't all the the overrides need to set it to false (at least for now)? ...
6 years, 2 months ago (2014-09-29 15:28:04 UTC) #4
egdaniel
Set isSingleComponent to false in all the current effects https://codereview.chromium.org/608253002/diff/1/include/gpu/GrProcessor.h File include/gpu/GrProcessor.h (right): https://codereview.chromium.org/608253002/diff/1/include/gpu/GrProcessor.h#newcode47 include/gpu/GrProcessor.h:47: ...
6 years, 2 months ago (2014-09-29 15:50:20 UTC) #5
reed1
Have you considered, since you're making a change to a virtual (with LOTS of subclasses) ...
6 years, 2 months ago (2014-09-29 15:58:31 UTC) #7
egdaniel
Updated
6 years, 2 months ago (2014-09-29 21:03:21 UTC) #8
bsalomon
https://codereview.chromium.org/608253002/diff/80001/include/gpu/GrProcessor.h File include/gpu/GrProcessor.h (right): https://codereview.chromium.org/608253002/diff/80001/include/gpu/GrProcessor.h#newcode40 include/gpu/GrProcessor.h:40: struct InvarientOutput{ "Invariant" (gulp) There might be some more ...
6 years, 2 months ago (2014-09-30 00:41:01 UTC) #9
egdaniel
https://codereview.chromium.org/608253002/diff/80001/include/gpu/GrProcessor.h File include/gpu/GrProcessor.h (right): https://codereview.chromium.org/608253002/diff/80001/include/gpu/GrProcessor.h#newcode40 include/gpu/GrProcessor.h:40: struct InvarientOutput{ On 2014/09/30 00:41:01, bsalomon wrote: > "Invariant" ...
6 years, 2 months ago (2014-10-02 14:58:33 UTC) #10
bsalomon
lgtm
6 years, 2 months ago (2014-10-02 15:16:25 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/608253002/100001
6 years, 2 months ago (2014-10-02 16:48:48 UTC) #13
commit-bot: I haz the power
Committed patchset #6 (id:100001) as 3b8af078281a5a20f951b9fd84f38d92b8f6217b
6 years, 2 months ago (2014-10-02 16:57:53 UTC) #14
robertphillips
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/617853003/ by robertphillips@google.com. ...
6 years, 2 months ago (2014-10-02 19:11:21 UTC) #15
egdaniel
Fix for the cmp gm failures
6 years, 2 months ago (2014-10-02 20:48:22 UTC) #16
bsalomon
lgtm
6 years, 2 months ago (2014-10-02 21:05:07 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/608253002/120001
6 years, 2 months ago (2014-10-03 13:17:00 UTC) #19
commit-bot: I haz the power
6 years, 2 months ago (2014-10-03 13:24:19 UTC) #20
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as 1a8ecdfb73a15de600d5779b75d7c4b61863c50b

Powered by Google App Engine
This is Rietveld 408576698