diff options
author | 2012-08-29 21:26:13 +0000 | |
---|---|---|
committer | 2012-08-29 21:26:13 +0000 | |
commit | 405d0f43d8fa03874aee23669e5fdb38f21cc3e7 (patch) | |
tree | eb0a7c1c4787c3a5545837e76d11982af482639a /include/core | |
parent | bae9ff70d911e1c1fe1db776f2640b45e9d5e749 (diff) |
In which a series of things around attachToCanvas and writePixels are fixed
Review URL: https://codereview.appspot.com/6506051/
git-svn-id: http://skia.googlecode.com/svn/trunk@5341 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkDevice.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index 41e316c9cc..da7842b566 100644 --- a/include/core/SkDevice.h +++ b/include/core/SkDevice.h @@ -145,6 +145,7 @@ public: * devices to prepare for drawing (e.g., locking their pixels, etc.) */ virtual void onAttachToCanvas(SkCanvas* canvas) { + SkASSERT(!fAttachedToCanvas); this->lockPixels(); #ifdef SK_DEBUG fAttachedToCanvas = true; @@ -158,6 +159,7 @@ public: * possibly from SkCanvas' dtor. */ virtual void onDetachFromCanvas() { + SkASSERT(fAttachedToCanvas); this->unlockPixels(); #ifdef SK_DEBUG fAttachedToCanvas = false; |