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

Issue 395273002: factor out flattening/unflattening of common fields from SkImageFilter (Closed)

Created:
6 years, 5 months ago by reed1
Modified:
6 years, 5 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

factor out flattening/unflattening of common fields from SkImageFilter This is a precursor to changing SkImageFilters (and all effects) to unflatten via a factory instead of a constructor. In that world, each subclass of ImageFilter will need to control/initiate the unflattening of the common fields, so they can be extract and passed to their Factory. Committed: https://skia.googlesource.com/skia/+/b959ec7815ae0f65f2aabdeaf280a2a2ee6db955

Patch Set 1 #

Patch Set 2 : #

Total comments: 5

Patch Set 3 : #

Total comments: 2

Patch Set 4 : use SkAutoSTarray #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -20 lines) Patch
M include/core/SkImageFilter.h View 1 2 3 2 chunks +26 lines, -0 lines 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 2 chunks +55 lines, -20 lines 1 comment Download

Messages

Total messages: 17 (0 generated)
reed1
6 years, 5 months ago (2014-07-16 19:01:59 UTC) #1
Stephen White
Looks ok, but I'd like to see how this would look from a subclass's deserializing ...
6 years, 5 months ago (2014-07-16 19:26:11 UTC) #2
reed1
https://codereview.chromium.org/395273002/diff/20001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/395273002/diff/20001/include/core/SkImageFilter.h#newcode225 include/core/SkImageFilter.h:225: kPreallocated = 4 On 2014/07/16 19:26:11, Stephen White wrote: ...
6 years, 5 months ago (2014-07-16 19:37:37 UTC) #3
Stephen White
https://codereview.chromium.org/395273002/diff/20001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/395273002/diff/20001/include/core/SkImageFilter.h#newcode225 include/core/SkImageFilter.h:225: kPreallocated = 4 On 2014/07/16 19:37:37, reed1 wrote: > ...
6 years, 5 months ago (2014-07-16 19:48:04 UTC) #4
reed1
On 2014/07/16 19:48:04, Stephen White wrote: > https://codereview.chromium.org/395273002/diff/20001/include/core/SkImageFilter.h > File include/core/SkImageFilter.h (right): > > https://codereview.chromium.org/395273002/diff/20001/include/core/SkImageFilter.h#newcode225 ...
6 years, 5 months ago (2014-07-16 20:39:42 UTC) #5
Stephen White
On 2014/07/16 20:39:42, reed1 wrote: > On 2014/07/16 19:48:04, Stephen White wrote: > > > ...
6 years, 5 months ago (2014-07-16 20:53:06 UTC) #6
reed1
Ah, I think I know what you're suggesting now, and why I structured this differently. ...
6 years, 5 months ago (2014-07-16 21:02:18 UTC) #7
Stephen White
On 2014/07/16 21:02:18, reed1 wrote: > Ah, I think I know what you're suggesting now, ...
6 years, 5 months ago (2014-07-16 21:15:56 UTC) #8
Stephen White
https://codereview.chromium.org/395273002/diff/40001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/395273002/diff/40001/include/core/SkImageFilter.h#newcode227 include/core/SkImageFilter.h:227: SkImageFilter* fStorage[kPreallocated]; Could we generalize this to some templated ...
6 years, 5 months ago (2014-07-16 21:16:55 UTC) #9
reed1
On 2014/07/16 21:15:56, Stephen White wrote: > On 2014/07/16 21:02:18, reed1 wrote: > > Ah, ...
6 years, 5 months ago (2014-07-17 12:57:33 UTC) #10
Stephen White
On 2014/07/17 12:57:33, reed1 wrote: > On 2014/07/16 21:15:56, Stephen White wrote: > > On ...
6 years, 5 months ago (2014-07-17 13:04:41 UTC) #11
reed1
https://codereview.chromium.org/395273002/diff/40001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/395273002/diff/40001/include/core/SkImageFilter.h#newcode227 include/core/SkImageFilter.h:227: SkImageFilter* fStorage[kPreallocated]; On 2014/07/16 21:16:54, Stephen White wrote: > ...
6 years, 5 months ago (2014-07-17 13:32:35 UTC) #12
reed1
You comments clearly point out that we are still in-the-mux of refining our factory and ...
6 years, 5 months ago (2014-07-17 13:34:02 UTC) #13
reed1
The CQ bit was checked by reed@google.com
6 years, 5 months ago (2014-07-17 13:34:16 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/395273002/60001
6 years, 5 months ago (2014-07-17 13:34:53 UTC) #15
commit-bot: I haz the power
Change committed as b959ec7815ae0f65f2aabdeaf280a2a2ee6db955
6 years, 5 months ago (2014-07-17 14:03:14 UTC) #16
Stephen White
6 years, 5 months ago (2014-07-18 15:14:55 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/395273002/diff/60001/src/core/SkImageFilter.cpp
File src/core/SkImageFilter.cpp (right):

https://codereview.chromium.org/395273002/diff/60001/src/core/SkImageFilter.c...
src/core/SkImageFilter.cpp:43: int count = buffer.readInt();
I think we should bail if the count is negative here, as it was in the old code.
Otherwise a count of -1 in a filter with variable inputs will pass validation
below.

Powered by Google App Engine
This is Rietveld 408576698