Index: include/core/SkPictureRecorder.h |
diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h |
index 8d29ff36daa310bcfbb3d3b0f3d9980a702d0dac..b13b8a809b21695e3c9ce86e73712120c572465b 100644 |
--- a/include/core/SkPictureRecorder.h |
+++ b/include/core/SkPictureRecorder.h |
@@ -14,10 +14,12 @@ |
class SkCanvas; |
class SkPictureRecord; |
+class SkRecord; |
+class SkRecorder; |
class SK_API SkPictureRecorder : SkNoncopyable { |
public: |
- SkPictureRecorder() : fCanvas(NULL) { } |
+ SkPictureRecorder() : fPictureRecord(NULL), fRecorder(NULL), fRecord(NULL) { } |
~SkPictureRecorder(); |
/** Returns the canvas that records the drawing commands. |
@@ -33,6 +35,10 @@ public: |
SkBBHFactory* bbhFactory = NULL, |
uint32_t recordFlags = 0); |
+ /** Same as beginRecording(), using a new faster backend. */ |
+ SkCanvas* EXPERIMENTAL_beginRecording(int width, int height, |
+ SkBBHFactory* bbhFactory = NULL); |
+ |
/** Returns the recording canvas if one is active, or NULL if recording is |
not active. This does not alter the refcnt on the canvas (if present). |
*/ |
@@ -54,6 +60,8 @@ public: |
void internalOnly_EnableOpts(bool enableOpts); |
private: |
+ void reset(); |
+ |
/** Replay the current (partially recorded) operation stream into |
canvas. This call doesn't close the current recording. |
*/ |
@@ -63,7 +71,13 @@ private: |
int fWidth; |
int fHeight; |
- SkPictureRecord* fCanvas; // ref counted |
+ |
+ // Both ref counted. One of these two will be non-null: |
+ SkPictureRecord* fPictureRecord; // beginRecording() |
+ SkRecorder* fRecorder; // EXPERIMENTAL_beginRecording() |
+ |
+ // Not refcounted. Used by EXPERIMENTAL_beginRecording(). |
+ SkRecord* fRecord; |
typedef SkNoncopyable INHERITED; |
}; |