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

Issue 185973003: Cleanup patch to move all of SkImageFilterUtils into SkImageFilter. (Closed)

Created:
6 years, 9 months ago by Stephen White
Modified:
6 years, 9 months ago
Reviewers:
bsalomon, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Cleanup patch to move all of SkImageFilterUtils into SkImageFilter. This was a utility class that dates from before GPU code was allowed in core. Now that it is, there's no reason not to have this functionality in SkImageFilter. Covered by existing tests. R=reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=13646

Patch Set 1 #

Patch Set 2 : Trying upload again #

Patch Set 3 : Rietveld, you are teh suck #

Patch Set 4 : Rietveld, you are still teh suck #

Patch Set 5 : Trying again #

Patch Set 6 : I just want to host 0.00000005 terabytes #

Patch Set 7 : Trying again #

Patch Set 8 : Such fail, wow #

Patch Set 9 : Fix initialization of source bitmaps #

Patch Set 10 : Re-upload #

Total comments: 2

Patch Set 11 : Fix capitalization #

Patch Set 12 : Oh, the Rietveld suckage #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -130 lines) Patch
M gyp/core.gypi View 2 chunks +0 lines, -2 lines 0 comments Download
M gyp/public_headers.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M include/core/SkImageFilter.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +15 lines, -0 lines 0 comments Download
D include/core/SkImageFilterUtils.h View 1 chunk +0 lines, -38 lines 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +43 lines, -5 lines 0 comments Download
D src/core/SkImageFilterUtils.cpp View 1 chunk +0 lines, -55 lines 0 comments Download
M src/effects/SkArithmeticMode.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M src/effects/SkBicubicImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -4 lines 0 comments Download
M src/effects/SkBlurImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -4 lines 0 comments Download
M src/effects/SkDisplacementMapEffect.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -8 lines 0 comments Download
M src/effects/SkMorphologyImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -4 lines 0 comments Download
M src/effects/SkXfermodeImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Stephen White
PTAL
6 years, 9 months ago (2014-03-03 21:58:54 UTC) #1
reed1
lgtm w/ nit https://codereview.chromium.org/185973003/diff/160001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/185973003/diff/160001/include/core/SkImageFilter.h#newcode153 include/core/SkImageFilter.h:153: static void wrapTexture(GrTexture* texture, int width, ...
6 years, 9 months ago (2014-03-03 22:07:04 UTC) #2
Stephen White
https://codereview.chromium.org/185973003/diff/160001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/185973003/diff/160001/include/core/SkImageFilter.h#newcode153 include/core/SkImageFilter.h:153: static void wrapTexture(GrTexture* texture, int width, int height, SkBitmap* ...
6 years, 9 months ago (2014-03-03 22:09:50 UTC) #3
Stephen White
Committed patchset #12 manually as r13646 (presubmit successful).
6 years, 9 months ago (2014-03-03 22:14:04 UTC) #4
reed1
Part of this was to move WrapTexture into SkImageFilter.h Two comments: 1. Can we make ...
6 years, 9 months ago (2014-03-04 21:03:26 UTC) #5
Stephen White
On 2014/03/04 21:03:26, reed1 wrote: > Part of this was to move WrapTexture into SkImageFilter.h ...
6 years, 9 months ago (2014-03-04 21:17:02 UTC) #6
bsalomon
On 2014/03/04 21:17:02, Stephen White wrote: > On 2014/03/04 21:03:26, reed1 wrote: > > Part ...
6 years, 9 months ago (2014-03-04 21:24:22 UTC) #7
Stephen White
6 years, 9 months ago (2014-03-04 21:32:13 UTC) #8
Message was sent while issue was closed.
On 2014/03/04 21:24:22, bsalomon wrote:
> On 2014/03/04 21:17:02, Stephen White wrote:
> > On 2014/03/04 21:03:26, reed1 wrote:
> > > Part of this was to move WrapTexture into SkImageFilter.h
> > > 
> > > Two comments:
> > > 
> > > 1. Can we make it protected instead of public, to be defensive (as it
> appears
> > to
> > > me that only subclasses need it..?)
> > 
> > SkMorphology needed it to be public, since it calls it from a file-static
> > function.
> > I could make that function part of the SkMorphologyImageFilter, but that
> exposes
> > a 
> > bunch of Ganesh stuff into SkMorphologyImageFilter.h.
> > 
> > (Note that there's nothing SkImageFilter-specific about WrapTexture(); it
> could
> > go 
> > anywhere, really.)
> > 
> > > 2. How can we evolve ImageFilters in general off of the notion that
SkBitmap
> > may
> > > in-fact be wrapping a GrTexture? Our long-term plan is to break that
> dualism,
> > > and it might be instructive to explore the question just in the context of
> > > ImageFilters...
> > 
> > Possibly doable, but the GPU implementations are always going to need some
way
> > to
> > get at the textures, in order to read from and render to. I don't have a
> strong
> > preference
> > about how that happens. Note that filterImageGPU() used to deal directly
with
> > GrTextures, but 
> > this became unwieldy with Skia lack of real smart pointers.
> > 
> > One thing I was thinking about was putting the guts of getInputResultGPU()
> into
> > the base 
> > class implementation of filterImageGPU(), and just getting rid of
> > canFilterImageGPU() and 
> > getInputResultGPU() entirely. Then if you don't have a GPU implementation,
we
> > just call 
> > onFilterImage() and upload it to a texture. This is essentially what happens
> > anyway, just in a 
> > more roundabout way.
> 
> Would it help to have image filters operate on... get ready for it... images?
> (As in SkImage.) The problem with SkBitmap-backed textures is that we bend
over
> backwards to make the SkBitmap API work for textures, but even then there are
> still behavior differences and ambiguities. The bitmap API was really designed
> for pixels in cpu-accessible memory and we'd like to roll back the
> generalization of SkBitmap to other backing stores. The limited API of SkImage
> is much more acceptable.

Yeah, Mike was asking for this before. I'm a little leery of the work of 
switching at this point, just as we're hoping to turn on the Skia DAG in Blink,
but it's definitely something we should look at for the future.

Powered by Google App Engine
This is Rietveld 408576698