Index: include/core/SkPicture.h |
=================================================================== |
--- include/core/SkPicture.h (revision 13766) |
+++ include/core/SkPicture.h (working copy) |
@@ -148,6 +148,33 @@ |
*/ |
void endRecording(); |
+ // An OperationList encapsulates a set of operation offsets into the picture byte |
+ // stream along with the CTMs needed for those operation. |
+ class OperationList : public SkNoncopyable { |
reed1
2014/03/14 18:28:32
does this class need to be public? Can it instead
robertphillips
2014/03/14 18:36:08
SkPicturePlayback provides the impl and is already
robertphillips
2014/03/14 19:23:23
Done.
|
+ public: |
+ // 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; }; |
+ // The offset in the picture of the operation to execute. |
+ 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: |
+ typedef SkNoncopyable INHERITED; |
+ }; |
+ |
+ /** PRIVATE / EXPERIMENTAL -- do not call |
+ Return the operations required to render the content inside 'queryRect'. |
+ */ |
+ const OperationList& EXPERIMENTAL_getActiveOps(const SkIRect& queryRect); |
+ |
/** Replays the drawing commands on the specified canvas. This internally |
calls endRecording() if that has not already been called. |
@param canvas the canvas receiving the drawing commands. |