aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPicture.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-07-08 06:12:22 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-08 06:12:22 -0700
commit3afef1f75f710b8f183113cdc5188416f7d01f28 (patch)
treea48ff16cc2cea31188977e49ad1efaceb99f6a3c /include/core/SkPicture.h
parent6815011292f0a130db2b35ca0f862b246769f3b8 (diff)
Clean up a bit after SkPictureData/SkPicturePlayback split
This CL begins setting up the SkPicturePlayback split by simplifying the class and componentizing it a bit. It: fuses SkPictureData::OperationList into SkPicture::OperationList adds a handleOp method to SkPicturePlayback that can be reused by derived classes removes a couple debugging tools (ENABLE_TIME_DRAW & SPEW_CLIP_SKIPPING) R=mtklein@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/378703002
Diffstat (limited to 'include/core/SkPicture.h')
-rw-r--r--include/core/SkPicture.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index d57af50611..6c486c9789 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -14,6 +14,7 @@
#include "SkDrawPictureCallback.h"
#include "SkImageDecoder.h"
#include "SkRefCnt.h"
+#include "SkTDArray.h"
#if SK_SUPPORT_GPU
class GrContext;
@@ -261,15 +262,15 @@ private:
// stream along with the CTMs needed for those operation.
class OperationList : ::SkNoncopyable {
public:
- virtual ~OperationList() {}
-
// The following three entry points should only be accessed if
// 'valid' returns true.
- virtual int numOps() const { SkASSERT(false); return 0; };
+ int numOps() const { return fOps.count(); }
// The offset in the picture of the operation to execute.
- virtual uint32_t offset(int index) const { SkASSERT(false); return 0; };
+ uint32_t offset(int index) const;
// The CTM that must be installed for the operation to behave correctly
- virtual const SkMatrix& matrix(int index) const { SkASSERT(false); return SkMatrix::I(); }
+ const SkMatrix& matrix(int index) const;
+
+ SkTDArray<void*> fOps;
};
/** PRIVATE / EXPERIMENTAL -- do not call