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

Issue 967143002: check for inputs before reporting asColorFilter (Closed)

Created:
5 years, 9 months ago by reed2
Modified:
5 years, 7 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

check for inputs before reporting asColorFilter moved to https://codereview.chromium.org/967833003 BUG=skia:

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : now with composecolorfilter #

Total comments: 1

Patch Set 4 : update to use composecolorfilter #

Patch Set 5 : remove obsolete test #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -20 lines) Patch
M src/effects/SkColorFilterImageFilter.cpp View 1 2 3 2 chunks +20 lines, -10 lines 3 comments Download
M tests/ImageFilterTest.cpp View 1 2 3 4 3 chunks +17 lines, -10 lines 0 comments Download

Messages

Total messages: 32 (11 generated)
reed2
Part of a large effort to devolve imagefilters into colorfilters when that is viable. That ...
5 years, 9 months ago (2015-03-01 19:03:32 UTC) #2
reed2
5 years, 9 months ago (2015-03-01 19:03:53 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/967143002/20001
5 years, 9 months ago (2015-03-01 19:04:39 UTC) #6
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 9 months ago (2015-03-01 19:04:39 UTC) #7
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Please ask for an LGTM from a full ...
5 years, 9 months ago (2015-03-02 01:04:40 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/967143002/40001
5 years, 9 months ago (2015-03-02 04:38:50 UTC) #11
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 9 months ago (2015-03-02 04:38:50 UTC) #12
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Please ask for an LGTM from a full ...
5 years, 9 months ago (2015-03-02 10:38:51 UTC) #14
Stephen White
https://codereview.chromium.org/967143002/diff/40001/src/effects/SkColorFilterImageFilter.cpp File src/effects/SkColorFilterImageFilter.cpp (right): https://codereview.chromium.org/967143002/diff/40001/src/effects/SkColorFilterImageFilter.cpp#newcode174 src/effects/SkColorFilterImageFilter.cpp:174: *filter = SkColorFilter::CreateComposeFilter(fColorFilter, inputCF); As discussed, I think this ...
5 years, 9 months ago (2015-03-02 16:13:43 UTC) #16
reed2
ptal
5 years, 9 months ago (2015-03-04 01:37:33 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/967143002/60001
5 years, 9 months ago (2015-03-04 01:38:47 UTC) #19
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 9 months ago (2015-03-04 01:38:49 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-Shared-Trybot/builds/2404)
5 years, 9 months ago (2015-03-04 01:42:48 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/967143002/80001
5 years, 9 months ago (2015-03-04 03:17:26 UTC) #24
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 9 months ago (2015-03-04 03:17:27 UTC) #25
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Please ask for an LGTM from a full ...
5 years, 9 months ago (2015-03-04 09:17:36 UTC) #27
Stephen White
https://codereview.chromium.org/967143002/diff/80001/src/effects/SkColorFilterImageFilter.cpp File src/effects/SkColorFilterImageFilter.cpp (right): https://codereview.chromium.org/967143002/diff/80001/src/effects/SkColorFilterImageFilter.cpp#newcode93 src/effects/SkColorFilterImageFilter.cpp:93: *filter = SkColorFilter::CreateComposeFilter(fColorFilter, inputCF); I don't understand the need ...
5 years, 9 months ago (2015-03-04 15:01:52 UTC) #28
reed1
https://codereview.chromium.org/967143002/diff/80001/src/effects/SkColorFilterImageFilter.cpp File src/effects/SkColorFilterImageFilter.cpp (right): https://codereview.chromium.org/967143002/diff/80001/src/effects/SkColorFilterImageFilter.cpp#newcode93 src/effects/SkColorFilterImageFilter.cpp:93: *filter = SkColorFilter::CreateComposeFilter(fColorFilter, inputCF); On 2015/03/04 15:01:52, Stephen White ...
5 years, 9 months ago (2015-03-04 15:49:01 UTC) #29
Stephen White
https://codereview.chromium.org/967143002/diff/80001/src/effects/SkColorFilterImageFilter.cpp File src/effects/SkColorFilterImageFilter.cpp (right): https://codereview.chromium.org/967143002/diff/80001/src/effects/SkColorFilterImageFilter.cpp#newcode93 src/effects/SkColorFilterImageFilter.cpp:93: *filter = SkColorFilter::CreateComposeFilter(fColorFilter, inputCF); On 2015/03/04 15:49:01, reed1 wrote: ...
5 years, 9 months ago (2015-03-04 16:06:56 UTC) #30
reed1
On 2015/03/04 16:06:56, Stephen White wrote: > https://codereview.chromium.org/967143002/diff/80001/src/effects/SkColorFilterImageFilter.cpp > File src/effects/SkColorFilterImageFilter.cpp (right): > > https://codereview.chromium.org/967143002/diff/80001/src/effects/SkColorFilterImageFilter.cpp#newcode93 ...
5 years, 9 months ago (2015-03-04 18:40:35 UTC) #31
Stephen White
5 years, 9 months ago (2015-03-04 19:10:22 UTC) #32
On 2015/03/04 18:40:35, reed1 wrote:
> On 2015/03/04 16:06:56, Stephen White wrote:
> >
>
https://codereview.chromium.org/967143002/diff/80001/src/effects/SkColorFilte...
> > File src/effects/SkColorFilterImageFilter.cpp (right):
> > 
> >
>
https://codereview.chromium.org/967143002/diff/80001/src/effects/SkColorFilte...
> > src/effects/SkColorFilterImageFilter.cpp:93: *filter =
> > SkColorFilter::CreateComposeFilter(fColorFilter, inputCF);
> > On 2015/03/04 15:49:01, reed1 wrote:
> > > On 2015/03/04 15:01:52, Stephen White wrote:
> > > > I don't understand the need to call this here as well as in the Create()
> > > > function above. Create() also calls asColorFilter(), so it seems like
> > > > CreateComposeFilter() is being called multiple times.
> > > > 
> > > > Create() should collapse any chain of CFIFs into a single CFIF on
> > > construction.
> > > > Then your IF -> CF optimization just has to check for a single CFIF (via
> the
> > > > original asColorFilter()) with a NULL input and extract its CF for
direct
> > > > application.
> > > 
> > > Ah, perhaps so. In that case I could instead add an assert that the input
> (if
> > > not null) is never a colorfilter?
> > 
> > It might have a crop rect. I suppose we could assert 
> > 
> > cropRectIsSet() || NULL == getInput(0) || !getInput(0)->asColorFilter()
> > 
> > maybe?
> 
> Do we need a version of that test before we can legally collapse in the
factory?

The factory can (and should, and does) collapse even if getInput(0) is non-NULL.

We still want to optimize e.g. blur -> cf1 -> cf2 into blur -> cf3.

We shouldn't optimize if there's a crop rect, which asColorFilter() takes care
of today (returns false).

Powered by Google App Engine
This is Rietveld 408576698