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

Issue 318923005: SkShader::asNewEffect Refactoring (Closed)

Created:
6 years, 6 months ago by dandov
Modified:
6 years, 6 months ago
Reviewers:
jvanverth1, bsalomon
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

SkShader::asNewEffect Refactoring The new signature is: bool asNewEffect(GrContext* context, const SkPaint& paint, GrColor* grColor, GrEffectRef** grEffect, const SkMatrix* localMatrixOrNull) const; It will fix the hack for skcolorshader by modifying the GrColor parameter in SkGr::SkPaint2GrPaintShader. BUG=skia:2646 Committed: https://skia.googlesource.com/skia/+/9de5b514d38c5b36066bcdc14fba2f7e5196d372

Patch Set 1 #

Patch Set 2 : Style corrections #

Total comments: 34

Patch Set 3 : SkColorShader refactor and fix #

Total comments: 22

Patch Set 4 : change contract on SkShader::asNewEffect and added fix for SkBitmapProcShader::asNewEffect taking i… #

Total comments: 6

Patch Set 5 : modified name of ignored test #

Patch Set 6 : fixed ignored test #

Patch Set 7 : fixed error for gcc #

Patch Set 8 : added macros to check for gpu support #

Unified diffs Side-by-side diffs Delta from patch set Stats (+273 lines, -134 lines) Patch
M expectations/gm/ignored-tests.txt View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M include/core/SkColorShader.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M include/core/SkShader.h View 1 2 3 3 chunks +8 lines, -4 lines 0 comments Download
M include/effects/SkPerlinNoiseShader.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M include/gpu/SkGr.h View 1 2 2 chunks +7 lines, -2 lines 0 comments Download
M src/core/SkBitmapProcShader.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M src/core/SkBitmapProcShader.cpp View 1 2 3 4 5 6 2 chunks +23 lines, -9 lines 0 comments Download
M src/core/SkLocalMatrixShader.h View 1 2 3 1 chunk +16 lines, -4 lines 0 comments Download
M src/core/SkPictureShader.h View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M src/core/SkPictureShader.cpp View 1 2 3 1 chunk +12 lines, -4 lines 0 comments Download
M src/core/SkShader.cpp View 1 2 3 4 5 6 7 2 chunks +29 lines, -2 lines 0 comments Download
M src/effects/SkPerlinNoiseShader.cpp View 1 2 3 6 chunks +18 lines, -10 lines 0 comments Download
M src/effects/gradients/SkLinearGradient.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/effects/gradients/SkLinearGradient.cpp View 1 2 3 4 5 6 7 3 chunks +20 lines, -8 lines 0 comments Download
M src/effects/gradients/SkRadialGradient.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/effects/gradients/SkRadialGradient.cpp View 1 2 3 4 5 6 7 3 chunks +20 lines, -9 lines 0 comments Download
M src/effects/gradients/SkSweepGradient.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/effects/gradients/SkSweepGradient.cpp View 1 2 3 4 5 6 7 3 chunks +20 lines, -8 lines 0 comments Download
M src/effects/gradients/SkTwoPointConicalGradient.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/effects/gradients/SkTwoPointConicalGradient.cpp View 1 2 3 4 5 6 7 2 chunks +12 lines, -7 lines 0 comments Download
M src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp View 1 2 3 4 5 5 chunks +20 lines, -5 lines 0 comments Download
M src/effects/gradients/SkTwoPointRadialGradient.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/effects/gradients/SkTwoPointRadialGradient.cpp View 1 2 3 4 5 6 7 5 chunks +20 lines, -10 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 5 4 chunks +9 lines, -4 lines 0 comments Download
M src/gpu/SkGr.cpp View 1 2 3 4 5 4 chunks +15 lines, -34 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
dandov
6 years, 6 months ago (2014-06-05 16:09:03 UTC) #1
jvanverth1
Initial comments -- I still need to go through all the SkShaders. https://codereview.chromium.org/318923005/diff/20001/include/core/SkShader.h File include/core/SkShader.h ...
6 years, 6 months ago (2014-06-05 17:03:07 UTC) #2
bsalomon
I just realized that maybe the idea is to address some of the things I've ...
6 years, 6 months ago (2014-06-05 17:32:45 UTC) #3
jvanverth1
More comments: https://codereview.chromium.org/318923005/diff/20001/src/core/SkBitmapProcShader.cpp File src/core/SkBitmapProcShader.cpp (right): https://codereview.chromium.org/318923005/diff/20001/src/core/SkBitmapProcShader.cpp#newcode386 src/core/SkBitmapProcShader.cpp:386: GrEffectRef** grEffect, const SkMatrix* localMatrix) const { ...
6 years, 6 months ago (2014-06-05 17:36:31 UTC) #4
dandov
I ended up implementing the asNewEffect in SkColorShader to address some of the comments. https://codereview.chromium.org/318923005/diff/20001/include/core/SkShader.h ...
6 years, 6 months ago (2014-06-06 21:50:44 UTC) #5
bsalomon
https://codereview.chromium.org/318923005/diff/30001/include/core/SkShader.h File include/core/SkShader.h (right): https://codereview.chromium.org/318923005/diff/30001/include/core/SkShader.h#newcode379 include/core/SkShader.h:379: * It always sets the value of grColor, the ...
6 years, 6 months ago (2014-06-09 14:11:31 UTC) #6
dandov
Finished changing the contract of SkShader::asNewEffect and fixed bug in SkBitmapProcShader::asNewEffect https://codereview.chromium.org/318923005/diff/30001/include/core/SkShader.h File include/core/SkShader.h (right): ...
6 years, 6 months ago (2014-06-09 19:10:55 UTC) #7
bsalomon
lgtm
6 years, 6 months ago (2014-06-09 19:23:15 UTC) #8
dandov
The CQ bit was checked by dandov@google.com
6 years, 6 months ago (2014-06-10 13:02:10 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/318923005/50001
6 years, 6 months ago (2014-06-10 13:02:53 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-10 13:02:59 UTC) #11
commit-bot: I haz the power
Failed to apply patch for expectations/gm/ignored-tests.txt: While running git apply --index -p1; error: patch failed: ...
6 years, 6 months ago (2014-06-10 13:03:00 UTC) #12
bsalomon
https://codereview.chromium.org/318923005/diff/50001/expectations/gm/ignored-tests.txt File expectations/gm/ignored-tests.txt (right): https://codereview.chromium.org/318923005/diff/50001/expectations/gm/ignored-tests.txt#newcode56 expectations/gm/ignored-tests.txt:56: bitmapshaders_gpu Late comment: Is the test named bitmapshaders or ...
6 years, 6 months ago (2014-06-10 13:24:10 UTC) #13
dandov
The CQ bit was checked by dandov@google.com
6 years, 6 months ago (2014-06-10 13:30:05 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/318923005/70001
6 years, 6 months ago (2014-06-10 13:30:13 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-10 13:30:18 UTC) #16
commit-bot: I haz the power
Failed to apply patch for expectations/gm/ignored-tests.txt: While running git apply --index -p1; error: patch failed: ...
6 years, 6 months ago (2014-06-10 13:30:18 UTC) #17
dandov
change name of ignored test https://codereview.chromium.org/318923005/diff/50001/expectations/gm/ignored-tests.txt File expectations/gm/ignored-tests.txt (right): https://codereview.chromium.org/318923005/diff/50001/expectations/gm/ignored-tests.txt#newcode56 expectations/gm/ignored-tests.txt:56: bitmapshaders_gpu On 2014/06/10 13:24:10, ...
6 years, 6 months ago (2014-06-10 13:49:33 UTC) #18
dandov
The CQ bit was checked by dandov@google.com
6 years, 6 months ago (2014-06-10 13:51:13 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/318923005/70001
6 years, 6 months ago (2014-06-10 13:52:23 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-10 13:52:30 UTC) #21
commit-bot: I haz the power
Failed to apply patch for expectations/gm/ignored-tests.txt: While running git apply --index -p1; error: patch failed: ...
6 years, 6 months ago (2014-06-10 13:52:31 UTC) #22
dandov
The CQ bit was checked by dandov@google.com
6 years, 6 months ago (2014-06-10 13:59:11 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/318923005/90001
6 years, 6 months ago (2014-06-10 13:59:23 UTC) #24
dandov
The CQ bit was checked by dandov@google.com
6 years, 6 months ago (2014-06-10 14:36:43 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/318923005/110001
6 years, 6 months ago (2014-06-10 14:37:31 UTC) #26
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug-Trybot on tryserver.chromium ...
6 years, 6 months ago (2014-06-10 16:02:38 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-10 16:50:14 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug-Trybot on tryserver.chromium (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug-Trybot/builds/252)
6 years, 6 months ago (2014-06-10 16:50:15 UTC) #29
dandov
The CQ bit was checked by dandov@google.com
6 years, 6 months ago (2014-06-10 19:05:58 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/318923005/130001
6 years, 6 months ago (2014-06-10 19:06:35 UTC) #31
commit-bot: I haz the power
6 years, 6 months ago (2014-06-10 21:38:32 UTC) #32
Message was sent while issue was closed.
Change committed as 9de5b514d38c5b36066bcdc14fba2f7e5196d372

Powered by Google App Engine
This is Rietveld 408576698