diff options
author | 2012-02-13 21:53:45 +0000 | |
---|---|---|
committer | 2012-02-13 21:53:45 +0000 | |
commit | 8f9ecbd3466d4330886b4c23b06e75b468c795ad (patch) | |
tree | f80694e771c12c45d9c738b879ab3e379f61f148 /include/utils | |
parent | 813d38b7a07957f2990ccca52ddab55fe0b1c632 (diff) |
Adding API and unit testing for deferred canvas clearing/purging
REVIEW=http://codereview.appspot.com/5646057/
TEST=DeferredCanvas unit test
git-svn-id: http://skia.googlecode.com/svn/trunk@3181 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/utils')
-rw-r--r-- | include/utils/SkDeferredCanvas.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h index 19d7141bc8..e06ea81cbc 100644 --- a/include/utils/SkDeferredCanvas.h +++ b/include/utils/SkDeferredCanvas.h @@ -181,8 +181,14 @@ public: */ SkDevice* immediateDevice() const {return fImmediateDevice;} + /** + * Returns true if an opaque draw operation covering the entire canvas + * was performed since the last call to isFreshFrame(). + */ + bool isFreshFrame(); + void flushPending(); - void purgePending(); + void contentsCleared(); void flushIfNeeded(const SkBitmap& bitmap); virtual uint32_t getDeviceCapabilities() SK_OVERRIDE; @@ -275,7 +281,7 @@ public: SkCanvas* fImmediateCanvas; SkCanvas* fRecordingCanvas; DeviceContext* fDeviceContext; - bool fBitmapInitialized; + bool fFreshFrame; }; DeferredDevice* getDeferredDevice() const; |