Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(735)

Issue 7064057: Add GrEffect::updateKnownColorComponents(). It is used to determine whether the output of an effect… (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by bsalomon
Modified:
11 years, 5 months ago
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Add GrEffect::updateKnownColorComponents(). It is used to determine whether the output of an effect has a constant output value for r,g,b, or a. Committed: https://code.google.com/p/skia/source/detail?r=7144

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -45 lines) Patch
M include/gpu/GrEffect.h View 1 2 3 4 2 chunks +24 lines, -5 lines 0 comments Download
M src/effects/SkBlendImageFilter.cpp View 1 2 3 4 2 chunks +15 lines, -0 lines 0 comments Download
M src/effects/SkColorMatrixFilter.cpp View 1 2 3 4 1 chunk +41 lines, -0 lines 3 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M src/effects/SkTableColorFilter.cpp View 1 2 3 4 7 chunks +37 lines, -11 lines 0 comments Download
M src/effects/gradients/SkGradientShader.cpp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M src/effects/gradients/SkGradientShaderPriv.h View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M src/gpu/GrDrawTarget.cpp View 1 2 3 4 1 chunk +37 lines, -25 lines 0 comments Download
M src/gpu/GrEffect.cpp View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M src/gpu/effects/GrSingleTextureEffect.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/gpu/effects/GrSingleTextureEffect.cpp View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 7
bsalomon
Currently I just use new virtual to reimplement srcAlphaWillBeOne() but the idea is to use ...
11 years, 5 months ago (2013-01-09 19:09:41 UTC) #1
robertphillips
LGTM + some nits & a question https://codereview.appspot.com/7064057/diff/4001/src/effects/SkColorMatrixFilter.cpp File src/effects/SkColorMatrixFilter.cpp (right): https://codereview.appspot.com/7064057/diff/4001/src/effects/SkColorMatrixFilter.cpp#newcode340 src/effects/SkColorMatrixFilter.cpp:340: OVERRIDE? https://codereview.appspot.com/7064057/diff/4001/src/effects/SkColorMatrixFilter.cpp#newcode360 ...
11 years, 5 months ago (2013-01-09 19:36:31 UTC) #2
bsalomon
https://codereview.appspot.com/7064057/diff/4001/src/effects/SkColorMatrixFilter.cpp File src/effects/SkColorMatrixFilter.cpp (right): https://codereview.appspot.com/7064057/diff/4001/src/effects/SkColorMatrixFilter.cpp#newcode340 src/effects/SkColorMatrixFilter.cpp:340: On 2013/01/09 19:36:31, robertphillips wrote: > OVERRIDE? Done. https://codereview.appspot.com/7064057/diff/4001/src/effects/SkColorMatrixFilter.cpp#newcode360 ...
11 years, 5 months ago (2013-01-09 19:43:00 UTC) #3
bsalomon
Stephen, did you want to look at this one? I implemented the new virtual for ...
11 years, 5 months ago (2013-01-10 19:18:25 UTC) #4
Stephen White
https://codereview.appspot.com/7064057/diff/11001/include/gpu/GrEffect.h File include/gpu/GrEffect.h (right): https://codereview.appspot.com/7064057/diff/11001/include/gpu/GrEffect.h#newcode60 include/gpu/GrEffect.h:60: virtual void updateKnownColorComponents(GrColor* color, uint32_t* validFlags) const = 0; ...
11 years, 5 months ago (2013-01-11 16:09:58 UTC) #5
bsalomon
The latest patchset (5) has the renaming to getConstantColorComponents and a very minor comment change ...
11 years, 5 months ago (2013-01-11 16:31:22 UTC) #6
Stephen White
11 years, 5 months ago (2013-01-11 20:44:45 UTC) #7
LGTM with nits (sorry if you get this twice; rietveld is giving me grief.)

https://codereview.appspot.com/7064057/diff/15001/src/effects/SkColorMatrixFi...
File src/effects/SkColorMatrixFilter.cpp (right):

https://codereview.appspot.com/7064057/diff/15001/src/effects/SkColorMatrixFi...
src/effects/SkColorMatrixFilter.cpp:343: // We only bother to check whether the
alpha channel will be known. If SkColorMatrix had
Nit:  known -> constant

https://codereview.appspot.com/7064057/diff/15001/src/effects/SkColorMatrixFi...
src/effects/SkColorMatrixFilter.cpp:365: // If any relevant component of the
color to be passed through the matrix is unknown we
Nit:  non-constant

https://codereview.appspot.com/7064057/diff/15001/src/effects/SkColorMatrixFi...
src/effects/SkColorMatrixFilter.cpp:373: outputA +=
fMatrix.fMat[kAlphaRowStartIdx + i] * component;
I was going to ask if there's a possibility for overflow here, but if there is,
it'd overflow in the normal processing path as well, I'm guessing.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b