| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 #ifdef SK_BUILD_FOR_ANDROID | 25 #ifdef SK_BUILD_FOR_ANDROID |
| 26 #include "SkThread.h" | 26 #include "SkThread.h" |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 class SkPictureRecord; | 29 class SkPictureRecord; |
| 30 class SkStream; | 30 class SkStream; |
| 31 class SkWStream; | 31 class SkWStream; |
| 32 class SkBBoxHierarchy; | 32 class SkBBoxHierarchy; |
| 33 class SkPictureStateTree; | 33 class SkPictureStateTree; |
| 34 class SkOffsetTable; |
| 34 | 35 |
| 35 struct SkPictInfo { | 36 struct SkPictInfo { |
| 36 enum Flags { | 37 enum Flags { |
| 37 kCrossProcess_Flag = 1 << 0, | 38 kCrossProcess_Flag = 1 << 0, |
| 38 kScalarIsFloat_Flag = 1 << 1, | 39 kScalarIsFloat_Flag = 1 << 1, |
| 39 kPtrIs64Bit_Flag = 1 << 2, | 40 kPtrIs64Bit_Flag = 1 << 2, |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 uint32_t fVersion; | 43 uint32_t fVersion; |
| 43 uint32_t fWidth; | 44 uint32_t fWidth; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 101 |
| 101 protected: | 102 protected: |
| 102 bool parseStream(SkStream*, const SkPictInfo&, | 103 bool parseStream(SkStream*, const SkPictInfo&, |
| 103 SkPicture::InstallPixelRefProc); | 104 SkPicture::InstallPixelRefProc); |
| 104 bool parseBuffer(SkReadBuffer& buffer); | 105 bool parseBuffer(SkReadBuffer& buffer); |
| 105 #ifdef SK_DEVELOPER | 106 #ifdef SK_DEVELOPER |
| 106 virtual bool preDraw(int opIndex, int type); | 107 virtual bool preDraw(int opIndex, int type); |
| 107 virtual void postDraw(int opIndex); | 108 virtual void postDraw(int opIndex); |
| 108 #endif | 109 #endif |
| 109 | 110 |
| 111 void preLoadBitmaps(const SkTDArray<void*>& results); |
| 112 |
| 110 private: | 113 private: |
| 111 class TextContainer { | 114 class TextContainer { |
| 112 public: | 115 public: |
| 113 size_t length() { return fByteLength; } | 116 size_t length() { return fByteLength; } |
| 114 const void* text() { return (const void*) fText; } | 117 const void* text() { return (const void*) fText; } |
| 115 size_t fByteLength; | 118 size_t fByteLength; |
| 116 const char* fText; | 119 const char* fText; |
| 117 }; | 120 }; |
| 118 | 121 |
| 119 const SkBitmap& getBitmap(SkReader32& reader) { | 122 const SkBitmap& getBitmap(SkReader32& reader) { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // bitmap allows playback to draw nothing and move on. | 221 // bitmap allows playback to draw nothing and move on. |
| 219 SkBitmap fBadBitmap; | 222 SkBitmap fBadBitmap; |
| 220 | 223 |
| 221 SkAutoTUnref<SkBitmapHeap> fBitmapHeap; | 224 SkAutoTUnref<SkBitmapHeap> fBitmapHeap; |
| 222 SkAutoTUnref<SkPathHeap> fPathHeap; | 225 SkAutoTUnref<SkPathHeap> fPathHeap; |
| 223 | 226 |
| 224 SkTRefArray<SkBitmap>* fBitmaps; | 227 SkTRefArray<SkBitmap>* fBitmaps; |
| 225 SkTRefArray<SkPaint>* fPaints; | 228 SkTRefArray<SkPaint>* fPaints; |
| 226 | 229 |
| 227 SkData* fOpData; // opcodes and parameters | 230 SkData* fOpData; // opcodes and parameters |
| 231 SkAutoTUnref<SkOffsetTable> fBitmapUseOffsets; |
| 228 | 232 |
| 229 SkPicture** fPictureRefs; | 233 SkPicture** fPictureRefs; |
| 230 int fPictureCount; | 234 int fPictureCount; |
| 231 | 235 |
| 232 SkBBoxHierarchy* fBoundingHierarchy; | 236 SkBBoxHierarchy* fBoundingHierarchy; |
| 233 SkPictureStateTree* fStateTree; | 237 SkPictureStateTree* fStateTree; |
| 234 | 238 |
| 235 SkTypefacePlayback fTFPlayback; | 239 SkTypefacePlayback fTFPlayback; |
| 236 SkFactoryPlayback* fFactoryPlayback; | 240 SkFactoryPlayback* fFactoryPlayback; |
| 237 #ifdef SK_BUILD_FOR_ANDROID | 241 #ifdef SK_BUILD_FOR_ANDROID |
| 238 SkMutex fDrawMutex; | 242 SkMutex fDrawMutex; |
| 239 bool fAbortCurrentPlayback; | 243 bool fAbortCurrentPlayback; |
| 240 #endif | 244 #endif |
| 241 }; | 245 }; |
| 242 | 246 |
| 243 #endif | 247 #endif |
| OLD | NEW |