diff options
author | 2012-06-01 21:23:07 +0000 | |
---|---|---|
committer | 2012-06-01 21:23:07 +0000 | |
commit | 4866cc0afb7571309d9fdecb221d919f663054c0 (patch) | |
tree | 3696433e73defaa1a3d8ec92da58b9877ba7fc91 /src/core/SkPicture.cpp | |
parent | 898e7b568f535fc62a92acda3c22a68cb6e04dcc (diff) |
Adding option to serialize mutable bitmaps in SkPicture
BUG=http://code.google.com/p/chromium/issues/detail?id=115654
REVIEW=http://codereview.appspot.com/6221066/
git-svn-id: http://skia.googlecode.com/svn/trunk@4130 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPicture.cpp')
-rw-r--r-- | src/core/SkPicture.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp index a3b7396b8b..812ea65eae 100644 --- a/src/core/SkPicture.cpp +++ b/src/core/SkPicture.cpp @@ -162,6 +162,14 @@ SkCanvas* SkPicture::beginRecording(int width, int height, return fRecord; } +bool SkPicture::hasRecorded() const { + return NULL != fRecord && fRecord->writeStream().size() > 0; +} + +bool SkPicture::willFlattenPixelsOnRecord(const SkBitmap& bitmap) const { + return NULL != fRecord && fRecord->shouldFlattenPixels(bitmap); +} + SkCanvas* SkPicture::getRecordingCanvas() const { // will be null if we are not recording return fRecord; |