Chromium Code Reviews| Index: src/core/SkPicturePlayback.h |
| =================================================================== |
| --- src/core/SkPicturePlayback.h (revision 13766) |
| +++ src/core/SkPicturePlayback.h (working copy) |
| @@ -85,6 +85,8 @@ |
| virtual ~SkPicturePlayback(); |
| + const SkPicture::OperationList& getActiveOps(const SkIRect& queryRect); |
| + |
| void draw(SkCanvas& canvas, SkDrawPictureCallback*); |
| void serialize(SkWStream*, SkPicture::EncodeBitmap) const; |
| @@ -109,7 +111,7 @@ |
| virtual void postDraw(int opIndex); |
| #endif |
| - void preLoadBitmaps(const SkTDArray<void*>& results); |
| + void preLoadBitmaps(const SkTDArray<void*>* results); |
|
reed1
2014/03/14 18:28:32
maybe unavoidable, but this method is not const, a
robertphillips
2014/03/14 18:36:08
This entry point will be going away. Everything is
|
| private: |
| class TextContainer { |
| @@ -237,6 +239,29 @@ |
| SkBBoxHierarchy* fBoundingHierarchy; |
| SkPictureStateTree* fStateTree; |
| + class CachedOperationList : public SkPicture::OperationList { |
| + public: |
| + CachedOperationList() { |
| + fCacheQueryRect.setEmpty(); |
| + } |
| + |
| + virtual bool valid() const { return true; } |
| + virtual int numOps() const SK_OVERRIDE { return fOps.count(); } |
| + virtual uint32_t offset(int index) const SK_OVERRIDE; |
| + virtual const SkMatrix& matrix(int index) const SK_OVERRIDE; |
| + |
| + // The query rect for which the cached active ops are valid |
| + SkIRect fCacheQueryRect; |
| + |
| + // The operations which are active within 'fCachedQueryRect' |
| + SkTDArray<void*> fOps; |
| + |
| + private: |
| + typedef SkPicture::OperationList INHERITED; |
| + }; |
| + |
| + CachedOperationList* fCachedActiveOps; |
| + |
| SkTypefacePlayback fTFPlayback; |
| SkFactoryPlayback* fFactoryPlayback; |
| #ifdef SK_BUILD_FOR_ANDROID |