aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-13 20:41:18 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-13 20:41:18 +0000
commit9a5b570e5cbf907fabd69a5ffef94ef135e4066f (patch)
tree1108e2ba10ba0dbc1e48683baaf0b4dd76a5b863
parent71f0f34f7d8e80fe760f318f29ba88ab58baff7d (diff)
Allow SkPicture-derived classes install their own SkPicturePlayback-derived object
-rw-r--r--include/core/SkPicture.h19
-rw-r--r--src/core/SkPicture.cpp11
2 files changed, 15 insertions, 15 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 06c99b1415..d513373621 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -149,9 +149,21 @@ public:
void abortPlayback();
protected:
- // fRecord and fWidth & fHeight are protected to allow derived classes to
- // install their own SkPictureRecord-derived recorders and set the picture
- // size
+ // V2 : adds SkPixelRef's generation ID.
+ // V3 : PictInfo tag at beginning, and EOF tag at the end
+ // V4 : move SkPictInfo to be the header
+ // V5 : don't read/write FunctionPtr on cross-process (we can detect that)
+ // V6 : added serialization of SkPath's bounds (and packed its flags tighter)
+ // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect)
+ // V8 : Add an option for encoding bitmaps
+ // V9 : Allow the reader and writer of an SKP disagree on whether to support
+ // SK_SUPPORT_HINTING_SCALE_FACTOR
+ static const int PICTURE_VERSION = 9;
+
+ // fPlayback, fRecord, fWidth & fHeight are protected to allow derived classes to
+ // install their own SkPicturePlayback-derived players,SkPictureRecord-derived
+ // recorders and set the picture size
+ SkPicturePlayback* fPlayback;
SkPictureRecord* fRecord;
int fWidth, fHeight;
@@ -160,7 +172,6 @@ protected:
virtual SkBBoxHierarchy* createBBoxHierarchy() const;
private:
- SkPicturePlayback* fPlayback;
friend class SkFlatPicture;
friend class SkPicturePlayback;
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 564a829d33..b9273df467 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -253,17 +253,6 @@ void SkPicture::draw(SkCanvas* surface) {
#include "SkStream.h"
-// V2 : adds SkPixelRef's generation ID.
-// V3 : PictInfo tag at beginning, and EOF tag at the end
-// V4 : move SkPictInfo to be the header
-// V5 : don't read/write FunctionPtr on cross-process (we can detect that)
-// V6 : added serialization of SkPath's bounds (and packed its flags tighter)
-// V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect)
-// V8 : Add an option for encoding bitmaps
-// V9 : Allow the reader and writer of an SKP disagree on whether to support
-// SK_SUPPORT_HINTING_SCALE_FACTOR
-#define PICTURE_VERSION 9
-
SkPicture::SkPicture(SkStream* stream, bool* success, SkSerializationHelpers::DecodeBitmap decoder) : SkRefCnt() {
if (success) {
*success = false;