aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPicture.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-07-07 13:46:35 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-07 13:46:35 -0700
commitce4dd3de38cd7c29bf5b9d8a8efb55c08ec9be47 (patch)
tree93e49c2020bb0a75e8acc3d09b8266962a171c14 /include/core/SkPicture.h
parent5e8a3c1b83b8e6f41452298a1da5343b471759fd (diff)
Split SkPicturePlayback out of SkPictureData
This splits the playback functionality out of SkPictureData. The old SkPictureData::draw method is pulled out along with its supporting functions as verbatim as possible. Some follow on CLs will be required to: re-enable profiling in the debugger (and remove the vestiges of SkTimedPicture) re-enable display of command offsets in the picture (this should probably wait until we've switched to SkRecord though) Clean up CachedOperationList (maybe fuse with SkPicture::OperationList) Split SkPicturePlayback into a base class and two derived classes Implement parallel version of GatherGPUInfo for SkRecord Landing this is blocked on removing Android's use of the abortPlayback entry point. R=mtklein@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/377623002
Diffstat (limited to 'include/core/SkPicture.h')
-rw-r--r--include/core/SkPicture.h24
1 files changed, 2 insertions, 22 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 62fc633198..d57af50611 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -181,15 +181,6 @@ public:
*/
bool willPlayBackBitmaps() const;
-#ifdef SK_BUILD_FOR_ANDROID
- /** Signals that the caller is prematurely done replaying the drawing
- commands. This can be called from a canvas virtual while the picture
- is drawing. Has no effect if the picture is not drawing.
- @deprecated preserving for legacy purposes
- */
- void abortPlayback();
-#endif
-
/** Return true if the SkStream/Buffer represents a serialized picture, and
fills out SkPictInfo. After this function returns, the data source is not
rewound so it will have to be manually reset before passing to
@@ -272,10 +263,6 @@ private:
public:
virtual ~OperationList() {}
- // If valid returns false then there is no optimization data
- // present. All the draw operations need to be issued.
- virtual bool valid() const { return false; }
-
// The following three entry points should only be accessed if
// 'valid' returns true.
virtual int numOps() const { SkASSERT(false); return 0; };
@@ -283,20 +270,12 @@ private:
virtual uint32_t offset(int index) const { SkASSERT(false); return 0; };
// The CTM that must be installed for the operation to behave correctly
virtual const SkMatrix& matrix(int index) const { SkASSERT(false); return SkMatrix::I(); }
-
- static const OperationList& InvalidList();
};
/** PRIVATE / EXPERIMENTAL -- do not call
Return the operations required to render the content inside 'queryRect'.
*/
- const OperationList& EXPERIMENTAL_getActiveOps(const SkIRect& queryRect) const;
-
- /** PRIVATE / EXPERIMENTAL -- do not call
- Return the ID of the operation currently being executed when playing
- back. 0 indicates no call is active.
- */
- size_t EXPERIMENTAL_curOpID() const;
+ const OperationList* EXPERIMENTAL_getActiveOps(const SkIRect& queryRect) const;
void createHeader(SkPictInfo* info) const;
static bool IsValidPictInfo(const SkPictInfo& info);
@@ -308,6 +287,7 @@ private:
friend class GrGatherCanvas;
friend class GrGatherDevice;
friend class SkDebugCanvas;
+ friend class SkPicturePlayback; // to get fData
typedef SkRefCnt INHERITED;