Refactoring how SkDeferredCanvas manages mutable bitmaps
authorjunov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 25 Jul 2012 17:27:13 +0000 (17:27 +0000)
committerjunov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 25 Jul 2012 17:27:13 +0000 (17:27 +0000)
commitb10a6bd0a7df0ceeea0d53585c049450ec58b4b9
tree182e9193cdba0d4cfa368fe6c17f4761acb83cae
parent91f319c5dc4493384f0a52aaeef3dcc311ef6ed0
Refactoring how SkDeferredCanvas manages mutable bitmaps

This CL makes the SkGPipe flavor of SkDeferredCanvas properly
decide whether to flush or record mutable bitmaps.  The flushing
is now managed by conditionally switching the canvas to non-deferred
mode, which avoids an unnecessary transient copy of the bitmap.

BUG=http://code.google.com/p/chromium/issues/detail?id=137884
TEST=DeferredCanvas unit test, sub test TestDeferredCanvasMemoryLimit
Review URL: https://codereview.appspot.com/6421060

git-svn-id: http://skia.googlecode.com/svn/trunk@4756 2bbb7eff-a529-9590-31e7-b0007b416f81
include/utils/SkDeferredCanvas.h
src/utils/SkDeferredCanvas.cpp
tests/DeferredCanvasTest.cpp