| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #ifndef SkPicturePlayback_DEFINED | 8 #ifndef SkPicturePlayback_DEFINED |
| 9 #define SkPicturePlayback_DEFINED | 9 #define SkPicturePlayback_DEFINED |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void dumpSize() const; | 95 void dumpSize() const; |
| 96 | 96 |
| 97 bool containsBitmaps() const; | 97 bool containsBitmaps() const; |
| 98 | 98 |
| 99 #ifdef SK_BUILD_FOR_ANDROID | 99 #ifdef SK_BUILD_FOR_ANDROID |
| 100 // Can be called in the middle of playback (the draw() call). WIll abort the | 100 // Can be called in the middle of playback (the draw() call). WIll abort the |
| 101 // drawing and return from draw() after the "current" op code is done | 101 // drawing and return from draw() after the "current" op code is done |
| 102 void abort() { fAbortCurrentPlayback = true; } | 102 void abort() { fAbortCurrentPlayback = true; } |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 size_t curOpID() const { return fCurOffset; } |
| 106 void resetOpID() { fCurOffset = 0; } |
| 107 |
| 105 protected: | 108 protected: |
| 106 bool parseStream(SkStream*, const SkPictInfo&, | 109 bool parseStream(SkStream*, const SkPictInfo&, |
| 107 SkPicture::InstallPixelRefProc); | 110 SkPicture::InstallPixelRefProc); |
| 108 bool parseBuffer(SkReadBuffer& buffer); | 111 bool parseBuffer(SkReadBuffer& buffer); |
| 109 #ifdef SK_DEVELOPER | 112 #ifdef SK_DEVELOPER |
| 110 virtual bool preDraw(int opIndex, int type); | 113 virtual bool preDraw(int opIndex, int type); |
| 111 virtual void postDraw(int opIndex); | 114 virtual void postDraw(int opIndex); |
| 112 #endif | 115 #endif |
| 113 | 116 |
| 114 void preLoadBitmaps(const SkTDArray<void*>* results); | 117 void preLoadBitmaps(const SkTDArray<void*>* results); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 SkTDArray<void*> fOps; | 260 SkTDArray<void*> fOps; |
| 258 | 261 |
| 259 private: | 262 private: |
| 260 typedef SkPicture::OperationList INHERITED; | 263 typedef SkPicture::OperationList INHERITED; |
| 261 }; | 264 }; |
| 262 | 265 |
| 263 CachedOperationList* fCachedActiveOps; | 266 CachedOperationList* fCachedActiveOps; |
| 264 | 267 |
| 265 SkTypefacePlayback fTFPlayback; | 268 SkTypefacePlayback fTFPlayback; |
| 266 SkFactoryPlayback* fFactoryPlayback; | 269 SkFactoryPlayback* fFactoryPlayback; |
| 270 |
| 271 // The offset of the current operation when within the draw method |
| 272 size_t fCurOffset; |
| 273 |
| 267 #ifdef SK_BUILD_FOR_ANDROID | 274 #ifdef SK_BUILD_FOR_ANDROID |
| 268 SkMutex fDrawMutex; | 275 SkMutex fDrawMutex; |
| 269 bool fAbortCurrentPlayback; | 276 bool fAbortCurrentPlayback; |
| 270 #endif | 277 #endif |
| 271 }; | 278 }; |
| 272 | 279 |
| 273 #endif | 280 #endif |
| OLD | NEW |