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

Issue 13602013: Allow single-pass filters (which use asNewEffect()) to participate in the image filter DAG. This w… (Closed)

Created:
7 years, 8 months ago by Stephen White
Modified:
7 years, 8 months ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Allow single-pass filters (which use asNewEffect()) to participate in the image filter DAG. This was done by implementing support for asNewEffect() in the default implementations of SkImageFilter::canFilterImageGPU() and SkImageFilter::filteImageGPU(). The derived class still only needs to asNewEffect(). This also allows us to remove any knowledge of single-pass image filters from SkGpuDevice. BUG= Committed: https://code.google.com/p/skia/source/detail?r=8563

Patch Set 1 #

Patch Set 2 : Remove all knowledge of asNewEffect() from SkImageFilter base class. #

Patch Set 3 : Change signature of asNewEffect() to return the GrEffectRef directly #

Patch Set 4 : Use SkAutoTUnref in place of explicit unref #

Patch Set 5 : Remove now-unused apply_effect() from SkGpuDevice. #

Patch Set 6 : Remove SkSinglePassImageFilter class; move impl into SkImageFilter::filterImageGPU(). #

Total comments: 2

Patch Set 7 : Restore the old signature for asNewEffect(). #

Patch Set 8 : Remove spurious assert. #

Patch Set 9 : Fix comment #

Patch Set 10 : Fix return value of SkImageFilter::asNewEffect(). #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -132 lines) Patch
M gyp/core.gypi View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M gyp/effects.gypi View 1 2 3 4 5 2 chunks +0 lines, -2 lines 0 comments Download
M include/core/SkImageFilter.h View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -6 lines 0 comments Download
A + include/core/SkImageFilterUtils.h View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
M include/effects/SkMagnifierImageFilter.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkMatrixConvolutionImageFilter.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +40 lines, -2 lines 3 comments Download
A + src/core/SkImageFilterUtils.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
D src/effects/SkImageFilterUtils.cpp View 1 2 3 4 5 1 chunk +0 lines, -46 lines 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 2 3 4 5 6 4 chunks +9 lines, -12 lines 0 comments Download
M src/effects/SkMagnifierImageFilter.cpp View 1 2 3 4 5 6 2 chunks +10 lines, -12 lines 0 comments Download
M src/effects/SkMatrixConvolutionImageFilter.cpp View 1 2 3 4 5 6 1 chunk +12 lines, -11 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 3 chunks +1 line, -40 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Stephen White
PTAL
7 years, 8 months ago (2013-04-07 20:30:03 UTC) #1
bsalomon
On 2013/04/07 20:30:03, Stephen White wrote: > PTAL Is it possible to do this without ...
7 years, 8 months ago (2013-04-08 15:09:55 UTC) #2
Stephen White
On 2013/04/08 15:09:55, bsalomon wrote: > On 2013/04/07 20:30:03, Stephen White wrote: > > PTAL ...
7 years, 8 months ago (2013-04-08 15:13:51 UTC) #3
Stephen White
On 2013/04/08 15:13:51, Stephen White wrote: > On 2013/04/08 15:09:55, bsalomon wrote: > > On ...
7 years, 8 months ago (2013-04-08 15:18:27 UTC) #4
bsalomon
On 2013/04/08 15:18:27, Stephen White wrote: > On 2013/04/08 15:13:51, Stephen White wrote: > > ...
7 years, 8 months ago (2013-04-08 15:28:02 UTC) #5
Stephen White
On 2013/04/08 15:28:02, bsalomon wrote: > On 2013/04/08 15:18:27, Stephen White wrote: > > On ...
7 years, 8 months ago (2013-04-08 15:38:45 UTC) #6
Stephen White
OK, I've removed SkSinglePassImageFilter, and moved its guts to the SkImageFilter::filterImageGPU() default impl. I've left ...
7 years, 8 months ago (2013-04-08 16:32:02 UTC) #7
bsalomon
Personally I think the old signature is easier on a subclass developer because they only ...
7 years, 8 months ago (2013-04-08 17:52:17 UTC) #8
Stephen White
On 2013/04/08 17:52:17, bsalomon wrote: > Personally I think the old signature is easier on ...
7 years, 8 months ago (2013-04-08 18:53:35 UTC) #9
bsalomon
lgtm with a some trivial nits https://codereview.chromium.org/13602013/diff/17003/src/core/SkImageFilter.cpp File src/core/SkImageFilter.cpp (right): https://codereview.chromium.org/13602013/diff/17003/src/core/SkImageFilter.cpp#newcode112 src/core/SkImageFilter.cpp:112: return asNewEffect(NULL, NULL); ...
7 years, 8 months ago (2013-04-08 19:38:29 UTC) #10
Stephen White
Committed patchset #10 manually as r8563 (presubmit successful).
7 years, 8 months ago (2013-04-08 19:43:33 UTC) #11
Stephen White
7 years, 8 months ago (2013-04-08 19:43:52 UTC) #12
Message was sent while issue was closed.
On 2013/04/08 19:38:29, bsalomon wrote:
> lgtm with a some trivial nits

Thanks for the review!  Nits fixed on landing.

https://codereview.chromium.org/13602013/diff/17003/src/core/SkImageFilter.cpp
> File src/core/SkImageFilter.cpp (right):
> 
>
https://codereview.chromium.org/13602013/diff/17003/src/core/SkImageFilter.cp...
> src/core/SkImageFilter.cpp:112: return asNewEffect(NULL, NULL);
> this->
> 
>
https://codereview.chromium.org/13602013/diff/17003/src/core/SkImageFilter.cp...
> src/core/SkImageFilter.cpp:119: if
> (!SkImageFilterUtils::GetInputResultGPU(getInput(0), proxy, src, &input)) {
> this->
> 
>
https://codereview.chromium.org/13602013/diff/17003/src/core/SkImageFilter.cp...
> src/core/SkImageFilter.cpp:139: asNewEffect(&effect, srcTexture);
> this->

Powered by Google App Engine
This is Rietveld 408576698