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

Issue 1292353005: Added SkComposeShader GPU implementation (Closed)

Created:
5 years, 4 months ago by wangyix
Modified:
5 years, 3 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia@cs3_glinstances2
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Added SkComposeShader GPU implementation moved onCreateGLInstance() to private in GrComposeEffect Added SkComposeShader gpu implementation; composeshader gm is unchanged BUG=skia:4182 TBR=bsalomon@google.com Committed: https://skia.googlesource.com/skia/+/73fa61670d95c52250a660a2cec618ab77716934

Patch Set 1 #

Total comments: 6

Patch Set 2 : updated SkComposeShader to use emitChild() #

Patch Set 3 : nits by Tom #

Patch Set 4 : asFragmentProcessor only accepts coefficient modes #

Patch Set 5 : handle null mode in asFragmentProcessor #

Patch Set 6 : asFragmentProcessor returns false if xfermode is kClear_Mode #

Total comments: 4

Patch Set 7 : added paint alpha un-premul/remul to emitted code #

Patch Set 8 : removed children's names from name of GrComposeEffect #

Total comments: 10

Patch Set 9 : rebase, mode optimizations, nits #

Total comments: 4

Patch Set 10 : Brian's nits #

Total comments: 6

Patch Set 11 : Josh's nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -0 lines) Patch
M include/core/SkComposeShader.h View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
M src/core/SkComposeShader.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +150 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (13 generated)
wangyix
This is what I have currently for SkComposeShader; this version actually assumes that the GL ...
5 years, 4 months ago (2015-08-14 16:22:26 UTC) #2
wangyix
I've updated SkComposeShader to use the emitChild() function added in https://codereview.chromium.org/1301523003
5 years, 4 months ago (2015-08-18 14:54:56 UTC) #4
tomhudson
lgtm https://codereview.chromium.org/1292353005/diff/1/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/1/src/core/SkComposeShader.cpp#newcode260 src/core/SkComposeShader.cpp:260: //GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrComposeShader); Remove commented-out code before committing. https://codereview.chromium.org/1292353005/diff/1/src/core/SkComposeShader.cpp#newcode278 src/core/SkComposeShader.cpp:278: ...
5 years, 4 months ago (2015-08-18 14:58:38 UTC) #5
wangyix
https://codereview.chromium.org/1292353005/diff/1/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/1/src/core/SkComposeShader.cpp#newcode260 src/core/SkComposeShader.cpp:260: //GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrComposeShader); On 2015/08/18 14:58:38, tomhudson wrote: > Remove commented-out ...
5 years, 4 months ago (2015-08-19 20:05:47 UTC) #6
wangyix
asFragmentProcessor() now only returns true for SkXfermodes that are coefficient modes, since the function GrGLBlend::AppendPorterDuffBlend(), ...
5 years, 4 months ago (2015-08-20 14:50:44 UTC) #7
wangyix
asFragmentProcessor() now returns false for xfermode kClear_Mode, since GrGLBlend::AppendPorterDuffBlend() fails an assert if you give ...
5 years, 4 months ago (2015-08-21 14:39:51 UTC) #8
egdaniel
On 2015/08/21 14:39:51, wangyix wrote: > asFragmentProcessor() now returns false for xfermode kClear_Mode, since > ...
5 years, 4 months ago (2015-08-21 15:29:37 UTC) #9
egdaniel
Hey so I think you should hold of on landing this at least for today. ...
5 years, 4 months ago (2015-08-21 16:21:39 UTC) #10
bsalomon
On 2015/08/21 16:21:39, egdaniel wrote: > Hey so I think you should hold of on ...
5 years, 4 months ago (2015-08-21 16:24:19 UTC) #11
wangyix
5 years, 3 months ago (2015-08-26 20:24:23 UTC) #16
bsalomon
https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp#newcode230 src/core/SkComposeShader.cpp:230: fName.printf("ComposeShader (Mode: %s)", SkXfermode::ModeName(fMode)); Maybe we should init this ...
5 years, 3 months ago (2015-08-27 20:12:24 UTC) #17
bsalomon
https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp#newcode353 src/core/SkComposeShader.cpp:353: #else Let's just put the function decl in the ...
5 years, 3 months ago (2015-08-28 16:15:30 UTC) #18
wangyix
https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp#newcode230 src/core/SkComposeShader.cpp:230: fName.printf("ComposeShader (Mode: %s)", SkXfermode::ModeName(fMode)); On 2015/08/27 20:12:24, bsalomon wrote: ...
5 years, 3 months ago (2015-08-31 14:10:05 UTC) #19
egdaniel
https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp#newcode328 src/core/SkComposeShader.cpp:328: || mode == SkXfermode::Mode::kClear_Mode) { On 2015/08/31 14:10:05, wangyix ...
5 years, 3 months ago (2015-08-31 14:43:05 UTC) #20
bsalomon
https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp#newcode230 src/core/SkComposeShader.cpp:230: fName.printf("ComposeShader (Mode: %s)", SkXfermode::ModeName(fMode)); On 2015/08/31 14:10:05, wangyix wrote: ...
5 years, 3 months ago (2015-08-31 14:48:35 UTC) #21
wangyix
https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp#newcode328 src/core/SkComposeShader.cpp:328: || mode == SkXfermode::Mode::kClear_Mode) { On 2015/08/31 14:48:35, bsalomon ...
5 years, 3 months ago (2015-08-31 15:59:24 UTC) #22
bsalomon
On 2015/08/31 15:59:24, wangyix wrote: > https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp > File src/core/SkComposeShader.cpp (right): > > https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp#newcode328 > ...
5 years, 3 months ago (2015-08-31 16:04:40 UTC) #23
wangyix
On 2015/08/31 16:04:40, bsalomon wrote: > I agree... why don't we make SkComposeShader's factory return ...
5 years, 3 months ago (2015-08-31 18:08:11 UTC) #24
wangyix
https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/220001/src/core/SkComposeShader.cpp#newcode230 src/core/SkComposeShader.cpp:230: fName.printf("ComposeShader (Mode: %s)", SkXfermode::ModeName(fMode)); On 2015/08/31 14:48:35, bsalomon wrote: ...
5 years, 3 months ago (2015-08-31 18:22:10 UTC) #25
bsalomon
https://codereview.chromium.org/1292353005/diff/240001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/240001/src/core/SkComposeShader.cpp#newcode230 src/core/SkComposeShader.cpp:230: fShaderAChildIndex = this->registerChildProcessor(fpA); Maybe just assert that indices are ...
5 years, 3 months ago (2015-08-31 18:51:37 UTC) #26
wangyix
https://codereview.chromium.org/1292353005/diff/240001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/240001/src/core/SkComposeShader.cpp#newcode230 src/core/SkComposeShader.cpp:230: fShaderAChildIndex = this->registerChildProcessor(fpA); On 2015/08/31 18:51:37, bsalomon wrote: > ...
5 years, 3 months ago (2015-08-31 20:12:31 UTC) #27
joshualitt
lgtm with some nits. https://codereview.chromium.org/1292353005/diff/260001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/260001/src/core/SkComposeShader.cpp#newcode283 src/core/SkComposeShader.cpp:283: fsBuilder->codeAppendf("float %s = %s.a;\n", inputAlpha.c_str(), ...
5 years, 3 months ago (2015-09-01 15:27:18 UTC) #28
wangyix
https://codereview.chromium.org/1292353005/diff/260001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/260001/src/core/SkComposeShader.cpp#newcode283 src/core/SkComposeShader.cpp:283: fsBuilder->codeAppendf("float %s = %s.a;\n", inputAlpha.c_str(), args.fInputColor); On 2015/09/01 15:27:18, ...
5 years, 3 months ago (2015-09-01 15:49:18 UTC) #29
joshualitt
https://codereview.chromium.org/1292353005/diff/260001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/260001/src/core/SkComposeShader.cpp#newcode295 src/core/SkComposeShader.cpp:295: fsBuilder->codeAppendf("// Compose Xfer Mode: %s\n", SkXfermode::ModeName(mode)); This should be ...
5 years, 3 months ago (2015-09-01 15:52:57 UTC) #30
wangyix
https://codereview.chromium.org/1292353005/diff/260001/src/core/SkComposeShader.cpp File src/core/SkComposeShader.cpp (right): https://codereview.chromium.org/1292353005/diff/260001/src/core/SkComposeShader.cpp#newcode295 src/core/SkComposeShader.cpp:295: fsBuilder->codeAppendf("// Compose Xfer Mode: %s\n", SkXfermode::ModeName(mode)); On 2015/09/01 15:52:57, ...
5 years, 3 months ago (2015-09-01 16:07:22 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292353005/220002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292353005/220002
5 years, 3 months ago (2015-09-01 16:07:53 UTC) #34
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-09-01 16:12:45 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292353005/220002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292353005/220002
5 years, 3 months ago (2015-09-01 16:22:04 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: skia_presubmit-Trybot on client.skia.fyi (JOB_FAILED, http://build.chromium.org/p/client.skia.fyi/builders/skia_presubmit-Trybot/builds/2322)
5 years, 3 months ago (2015-09-01 16:23:05 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292353005/220002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292353005/220002
5 years, 3 months ago (2015-09-01 16:44:42 UTC) #43
commit-bot: I haz the power
5 years, 3 months ago (2015-09-01 16:45:11 UTC) #44
Message was sent while issue was closed.
Committed patchset #11 (id:220002) as
https://skia.googlesource.com/skia/+/73fa61670d95c52250a660a2cec618ab77716934

Powered by Google App Engine
This is Rietveld 408576698