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

Issue 167113003: Add capture snapshot as data to SkWriter32, use it to optimise record->playback. (Closed)

Created:
6 years, 10 months ago by iancottrell
Modified:
6 years, 9 months ago
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Add capture snapshot as data to SkWriter32, use it to optimise record->playback. This is a new way of implementing https://codereview.chromium.org/155863005/ It uses copy on write semantics to return a buffer without copying it, so that record -> playback does not need to copy the buffer. BUG=skia:2125 Committed: http://code.google.com/p/skia/source/detail?r=13769

Patch Set 1 #

Patch Set 2 : Add reset and comment #

Total comments: 16

Patch Set 3 : Review fixes #

Patch Set 4 : Writer32 snapshot tests #

Patch Set 5 : Mutex protect snapshot creation #

Total comments: 10

Patch Set 6 : Review fixes #

Patch Set 7 : Adding thread saftey comment #

Patch Set 8 : Adding an ASSERT for an undefined write to a snapshotted SkWriter32 #

Patch Set 9 : Clarified the snapshotAsData api comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -10 lines) Patch
M include/core/SkWriter32.h View 1 2 3 4 5 6 7 8 6 chunks +18 lines, -2 lines 0 comments Download
M src/core/SkPicturePlayback.cpp View 1 2 3 4 5 2 chunks +2 lines, -8 lines 0 comments Download
M src/core/SkWriter32.cpp View 1 2 3 4 5 1 chunk +28 lines, -0 lines 0 comments Download
M tests/Writer32Test.cpp View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
iancottrell
6 years, 10 months ago (2014-02-14 17:19:21 UTC) #1
reed1
Caches are nice, but why are we caching the data, instead of having the client ...
6 years, 10 months ago (2014-02-14 17:31:07 UTC) #2
reed1
If we're going to cache, seems like we need to invalidate the cache if anyone ...
6 years, 10 months ago (2014-02-14 17:31:37 UTC) #3
reed1
Lets add a unittest for this guy...
6 years, 10 months ago (2014-02-14 17:32:04 UTC) #4
reed1
https://codereview.chromium.org/167113003/diff/30001/src/core/SkWriter32.cpp File src/core/SkWriter32.cpp (right): https://codereview.chromium.org/167113003/diff/30001/src/core/SkWriter32.cpp#newcode94 src/core/SkWriter32.cpp:94: fData = buffer; What if someone does a readAt(), ...
6 years, 10 months ago (2014-02-14 17:35:27 UTC) #5
mtklein
neat https://codereview.chromium.org/167113003/diff/30001/include/core/SkWriter32.h File include/core/SkWriter32.h (right): https://codereview.chromium.org/167113003/diff/30001/include/core/SkWriter32.h#newcode242 include/core/SkWriter32.h:242: SkData* snapshotAsData() const { Why have both const ...
6 years, 10 months ago (2014-02-14 17:42:18 UTC) #6
iancottrell
On 2014/02/14 17:31:37, reed1 wrote: > If we're going to cache, seems like we need ...
6 years, 10 months ago (2014-02-14 18:27:37 UTC) #7
iancottrell
On 2014/02/14 17:32:04, reed1 wrote: > Lets add a unittest for this guy... Yes, definitely ...
6 years, 10 months ago (2014-02-14 18:28:24 UTC) #8
iancottrell
https://codereview.chromium.org/167113003/diff/30001/include/core/SkWriter32.h File include/core/SkWriter32.h (right): https://codereview.chromium.org/167113003/diff/30001/include/core/SkWriter32.h#newcode237 include/core/SkWriter32.h:237: * Multiple calls without intervening writes may return the ...
6 years, 10 months ago (2014-02-14 18:28:36 UTC) #9
reed1
On 2014/02/14 18:28:36, iancottrell wrote: > https://codereview.chromium.org/167113003/diff/30001/include/core/SkWriter32.h > File include/core/SkWriter32.h (right): > > https://codereview.chromium.org/167113003/diff/30001/include/core/SkWriter32.h#newcode237 > ...
6 years, 10 months ago (2014-02-14 18:51:35 UTC) #10
tomhudson
This LGTM once the Skia team answers the threadsafety question & the comment nits are ...
6 years, 10 months ago (2014-02-17 14:14:30 UTC) #11
ian_cottrell
https://codereview.chromium.org/167113003/diff/30001/src/core/SkWriter32.cpp File src/core/SkWriter32.cpp (right): https://codereview.chromium.org/167113003/diff/30001/src/core/SkWriter32.cpp#newcode81 src/core/SkWriter32.cpp:81: if ((fSnapshot.get() != NULL) && (fSnapshot->size() != fUsed)) { ...
6 years, 10 months ago (2014-02-17 14:29:57 UTC) #12
iancottrell
Also with added tests for basic behavior and COW behavior. https://codereview.chromium.org/167113003/diff/30001/include/core/SkWriter32.h File include/core/SkWriter32.h (right): https://codereview.chromium.org/167113003/diff/30001/include/core/SkWriter32.h#newcode243 ...
6 years, 9 months ago (2014-02-27 20:16:18 UTC) #13
mtklein
Sorry, let this slip through the cracks. https://codereview.chromium.org/167113003/diff/30001/src/core/SkWriter32.cpp File src/core/SkWriter32.cpp (right): https://codereview.chromium.org/167113003/diff/30001/src/core/SkWriter32.cpp#newcode93 src/core/SkWriter32.cpp:93: // is ...
6 years, 9 months ago (2014-03-06 18:58:06 UTC) #14
mtklein
On 2014/03/06 18:58:06, mtklein wrote: > Sorry, let this slip through the cracks. > > ...
6 years, 9 months ago (2014-03-06 19:02:16 UTC) #15
reed1
https://codereview.chromium.org/167113003/diff/250001/include/core/SkWriter32.h File include/core/SkWriter32.h (right): https://codereview.chromium.org/167113003/diff/250001/include/core/SkWriter32.h#newcode240 include/core/SkWriter32.h:240: * without an intervening append may. "may" -- does ...
6 years, 9 months ago (2014-03-06 19:20:30 UTC) #16
reed1
separate question : can we move SkWriter32.h into src to hide it from our clients?
6 years, 9 months ago (2014-03-06 19:20:57 UTC) #17
iancottrell
I think we can make SkWriter32 non public, can I try in a follow up ...
6 years, 9 months ago (2014-03-06 21:31:52 UTC) #18
reed1
Exactly because it is an implementation detail (that could change) I think we should make ...
6 years, 9 months ago (2014-03-07 13:44:07 UTC) #19
ian_cottrell
On 2014/03/07 13:44:07, reed1 wrote: > Exactly because it is an implementation detail (that could ...
6 years, 9 months ago (2014-03-07 13:56:40 UTC) #20
reed1
On 2014/03/07 13:56:40, ian_cottrell wrote: > On 2014/03/07 13:44:07, reed1 wrote: > > Exactly because ...
6 years, 9 months ago (2014-03-07 14:02:35 UTC) #21
iancottrell
On 2014/03/07 14:02:35, reed1 wrote: > On 2014/03/07 13:56:40, ian_cottrell wrote: > > On 2014/03/07 ...
6 years, 9 months ago (2014-03-10 10:10:55 UTC) #22
reed1
Perhaps we should have a quick VC. I still believe the function should officially say ...
6 years, 9 months ago (2014-03-10 13:15:44 UTC) #23
iancottrell
On 2014/03/10 13:15:44, reed1 wrote: > Perhaps we should have a quick VC. I still ...
6 years, 9 months ago (2014-03-11 21:15:24 UTC) #24
reed1
lgtm perhaps we should file a bug now, reminding us that with future changes to ...
6 years, 9 months ago (2014-03-12 13:17:12 UTC) #25
iancottrell
On 2014/03/12 13:17:12, reed1 wrote: > lgtm > > perhaps we should file a bug ...
6 years, 9 months ago (2014-03-12 13:46:16 UTC) #26
iancottrell
The CQ bit was checked by iancottrell@google.com
6 years, 9 months ago (2014-03-12 15:52:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/iancottrell@google.com/167113003/330001
6 years, 9 months ago (2014-03-12 15:52:16 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/iancottrell@google.com/167113003/330001
6 years, 9 months ago (2014-03-12 16:48:34 UTC) #29
commit-bot: I haz the power
6 years, 9 months ago (2014-03-12 17:04:31 UTC) #30
Message was sent while issue was closed.
Change committed as 13769

Powered by Google App Engine
This is Rietveld 408576698