Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(256)

Issue 6531048: Fixing how deferred canvas purges itself when a clear is recoreded. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by junov1
Modified:
12 years, 2 months ago
Reviewers:
Leon, Stephen White, reed1
CC:
skia-review_googlegroups.com, bsalomon
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fixing how deferred canvas purges itself when a clear is recoreded. This fixes performance because the old code was not reconstructing the clip state correctly. This was causing a major performance degradation in the Galactic IE testdrive demo. This fix also enbles the purge on clear optimization when there is saved state on the matrix/clip stack. The approach taken to solve the problem consists in purging by running the playback silently. The previous approach was tearing down and restarting the gpipe, which required reconstructing state, which is fragile and hard to do correctly, and has the side effect of clearing the bitmap heap and the flattened dictionary. Note: This CL is expected to slightly degrade performance of the deferred_canvas_record bench, which uses the skip on clear optimization. This is because a silent playback takes more time that just destroying the SkGPipe. Correctness trumps performance. BUG=http://code.google.com/p/chromium/issues/detail?id=146178 Committed: https://code.google.com/p/skia/source/detail?r=5627

Patch Set 1 #

Total comments: 7

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -62 lines) Patch
M src/utils/SkDeferredCanvas.cpp View 1 2 3 17 chunks +22 lines, -62 lines 0 comments Download

Messages

Total messages: 14
junov1
PTAL
12 years, 2 months ago (2012-09-19 21:10:46 UTC) #1
Stephen White
https://codereview.appspot.com/6531048/diff/1/src/utils/SkDeferredCanvas.cpp File src/utils/SkDeferredCanvas.cpp (right): https://codereview.appspot.com/6531048/diff/1/src/utils/SkDeferredCanvas.cpp#newcode154 src/utils/SkDeferredCanvas.cpp:154: void nullPlayback(); Drive-by bikeshed paintsplatter: maybe this should be ...
12 years, 2 months ago (2012-09-19 21:18:34 UTC) #2
reed1
adding leon
12 years, 2 months ago (2012-09-19 21:20:41 UTC) #3
junov1
On 2012/09/19 21:18:34, Stephen White wrote: > Maybe playbackToNullIfPossible()? (Ok, that's pretty horrible, but you ...
12 years, 2 months ago (2012-09-19 21:29:48 UTC) #4
Stephen White
On 2012/09/19 21:29:48, junov1 wrote: > On 2012/09/19 21:18:34, Stephen White wrote: > > Maybe ...
12 years, 2 months ago (2012-09-19 21:33:52 UTC) #5
junov1
On 2012/09/19 21:33:52, Stephen White wrote: > skipDeferredWhat? Commands! You know what, let me do ...
12 years, 2 months ago (2012-09-19 21:38:07 UTC) #6
Leon
Some nits, but otherwise lgtm https://codereview.appspot.com/6531048/diff/1/src/utils/SkDeferredCanvas.cpp File src/utils/SkDeferredCanvas.cpp (left): https://codereview.appspot.com/6531048/diff/1/src/utils/SkDeferredCanvas.cpp#oldcode392 src/utils/SkDeferredCanvas.cpp:392: // TODO: find a ...
12 years, 2 months ago (2012-09-19 21:59:34 UTC) #7
Stephen White
LGTM
12 years, 2 months ago (2012-09-19 22:00:58 UTC) #8
junov1
On 2012/09/19 21:59:34, scroggo-work wrote: https://codereview.appspot.com/6531048/diff/1/src/utils/SkDeferredCanvas.cpp#newcode196 > src/utils/SkDeferredCanvas.cpp:196: SkRefCnt_SafeAssign(fPlaybackDevice, > canvas->getDevice()); > Since fPlaybackDevice is ...
12 years, 2 months ago (2012-09-19 23:52:23 UTC) #9
junov1
New Patch : using silent playback (newly added to SkGPipe) rather than playing to a ...
12 years, 2 months ago (2012-09-20 19:57:12 UTC) #10
Leon
https://codereview.appspot.com/6531048/diff/9001/src/utils/SkDeferredCanvas.cpp File src/utils/SkDeferredCanvas.cpp (left): https://codereview.appspot.com/6531048/diff/9001/src/utils/SkDeferredCanvas.cpp#oldcode407 src/utils/SkDeferredCanvas.cpp:407: this->endRecording(); I think you can now remove DeferredDevice::endRecording() and ...
12 years, 2 months ago (2012-09-20 20:00:29 UTC) #11
reed1
lgtm https://codereview.appspot.com/6531048/diff/9001/src/utils/SkDeferredCanvas.cpp File src/utils/SkDeferredCanvas.cpp (right): https://codereview.appspot.com/6531048/diff/9001/src/utils/SkDeferredCanvas.cpp#newcode391 src/utils/SkDeferredCanvas.cpp:391: fFreshFrame = true; a bool seems so inexplicable ...
12 years, 2 months ago (2012-09-20 20:01:06 UTC) #12
junov1
Patch. FYI, this patch justifiably regresses the performance of the deferred_canvas_record bench (see patch description)
12 years, 2 months ago (2012-09-20 20:33:13 UTC) #13
Leon
12 years, 2 months ago (2012-09-20 20:41:38 UTC) #14
On 2012/09/20 20:33:13, junov1 wrote:
> Patch. 
> 
> FYI, this patch justifiably regresses the performance of the
> deferred_canvas_record bench (see patch description)

lgtm
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b