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

Issue 6425053: Fix unbounded memory consumption problem with run away deferred canvases (Closed)

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

Description

Fix unbound memory consumption problem with run away deferred canvases. With this CL, deferred canvases will trigger a flush when then the memory allocated for recording commands (including flattened objects) exceeds 64MB. TEST=DeferredCanvas skia unit test, test step TestDeferredCanvasMemoryLimit BUG=http://code.google.com/p/chromium/issues/detail?id=137884 Committed: https://code.google.com/p/skia/source/detail?r=4714

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -9 lines) Patch
M include/utils/SkDeferredCanvas.h View 1 2 3 4 5 5 chunks +12 lines, -1 line 1 comment Download
M src/utils/SkDeferredCanvas.cpp View 1 2 3 4 5 6 11 chunks +31 lines, -7 lines 0 comments Download
M tests/DeferredCanvasTest.cpp View 1 2 3 4 5 6 2 chunks +44 lines, -1 line 0 comments Download

Messages

Total messages: 15
junov1
PTAL
12 years, 4 months ago (2012-07-19 19:46:25 UTC) #1
reed1
As I am in a strange land called Canada today, I won't be able to ...
12 years, 4 months ago (2012-07-20 11:58:53 UTC) #2
junov1
DeferredCanvas using pipe is functional, and it appears to be in good health (passes all ...
12 years, 4 months ago (2012-07-20 13:16:27 UTC) #3
Leon
https://codereview.appspot.com/6425053/diff/1/src/utils/SkDeferredCanvas.cpp File src/utils/SkDeferredCanvas.cpp (right): https://codereview.appspot.com/6425053/diff/1/src/utils/SkDeferredCanvas.cpp#newcode628 src/utils/SkDeferredCanvas.cpp:628: flushPending(); this->flushPending() https://codereview.appspot.com/6425053/diff/1/src/utils/SkDeferredCanvas.cpp#newcode632 src/utils/SkDeferredCanvas.cpp:632: flushPending(); this->flushPending() https://codereview.appspot.com/6425053/diff/1/tests/DeferredCanvasTest.cpp File tests/DeferredCanvasTest.cpp ...
12 years, 4 months ago (2012-07-20 14:20:24 UTC) #4
junov1
So after all the testing I conducted today, I can say that the state of ...
12 years, 4 months ago (2012-07-20 19:11:21 UTC) #5
Leon
https://codereview.appspot.com/6425053/diff/7001/tests/DeferredCanvasTest.cpp File tests/DeferredCanvasTest.cpp (right): https://codereview.appspot.com/6425053/diff/7001/tests/DeferredCanvasTest.cpp#newcode217 tests/DeferredCanvasTest.cpp:217: REPORTER_ASSERT(reporter, mockDevice.fDrawBitmapCallCount == 4); Now that the loop above ...
12 years, 4 months ago (2012-07-20 19:21:34 UTC) #6
junov1
D'oh! that was a temp edit. Good catch. On Fri, Jul 20, 2012 at 3:21 ...
12 years, 4 months ago (2012-07-20 19:30:32 UTC) #7
junov1
New patch. Test will be disabled until The SkGPipe path in SkDeferredCanvas starts conditionally flattening ...
12 years, 4 months ago (2012-07-20 19:38:18 UTC) #8
Leon
lgtm
12 years, 4 months ago (2012-07-20 19:48:16 UTC) #9
junov1
On 2012/07/20 19:48:16, scroggo-work wrote: > lgtm Thx. Will wait to commit in case Mike ...
12 years, 4 months ago (2012-07-20 20:06:37 UTC) #10
reed1
much cleaner! Sure feels like that giant budget should be available as a setter to ...
12 years, 4 months ago (2012-07-20 20:29:51 UTC) #11
junov1
Hah! That will also allow me to make the unit test independent from the hard-coded ...
12 years, 4 months ago (2012-07-20 20:38:30 UTC) #12
junov1
New patch.
12 years, 4 months ago (2012-07-20 21:07:47 UTC) #13
reed1
lgtm how much of what is in the public header can be made private to ...
12 years, 4 months ago (2012-07-21 16:48:08 UTC) #14
junov1
12 years, 4 months ago (2012-07-23 13:32:06 UTC) #15
On 2012/07/21 16:48:08, reed1 wrote:
> lgtm
> 
> how much of what is in the public header can be made private to the impl?

That went through my mind when I was looking at the SkGPipe implementation
(which has a lot of private stuff).  There is a whole lot I could hide.  In a
few places I am directly accessing the deferred device, but that could be hidden
with a couple additions to the SkDeferredCanvas API.  I'll get on that as soon
as I am done with M22 stuff.  

http://code.google.com/p/skia/issues/detail?id=728
Sign in to reply to this message.

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