| 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 |
| 11 #include "SkPicture.h" | 11 #include "SkPicture.h" |
| 12 #include "SkReader32.h" | 12 #include "SkReader32.h" |
| 13 | 13 |
| 14 #include "SkBitmap.h" | 14 #include "SkBitmap.h" |
| 15 #include "SkData.h" | 15 #include "SkData.h" |
| 16 #include "SkMatrix.h" | 16 #include "SkMatrix.h" |
| 17 #include "SkOrderedReadBuffer.h" | 17 #include "SkReadBuffer.h" |
| 18 #include "SkPaint.h" | 18 #include "SkPaint.h" |
| 19 #include "SkPath.h" | 19 #include "SkPath.h" |
| 20 #include "SkPathHeap.h" | 20 #include "SkPathHeap.h" |
| 21 #include "SkRegion.h" | 21 #include "SkRegion.h" |
| 22 #include "SkRRect.h" | 22 #include "SkRRect.h" |
| 23 #include "SkPictureFlat.h" | 23 #include "SkPictureFlat.h" |
| 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 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 void dumpText(char** bufferPtrPtr, char* buffer); | 185 void dumpText(char** bufferPtrPtr, char* buffer); |
| 186 void dumpStream(); | 186 void dumpStream(); |
| 187 | 187 |
| 188 public: | 188 public: |
| 189 void dump() const; | 189 void dump() const; |
| 190 #endif | 190 #endif |
| 191 | 191 |
| 192 private: // these help us with reading/writing | 192 private: // these help us with reading/writing |
| 193 bool parseStreamTag(SkStream*, const SkPictInfo&, uint32_t tag, size_t size, | 193 bool parseStreamTag(SkStream*, const SkPictInfo&, uint32_t tag, size_t size, |
| 194 SkPicture::InstallPixelRefProc); | 194 SkPicture::InstallPixelRefProc); |
| 195 bool parseBufferTag(SkOrderedReadBuffer&, uint32_t tag, size_t size); | 195 bool parseBufferTag(SkReadBuffer&, uint32_t tag, size_t size); |
| 196 void flattenToBuffer(SkOrderedWriteBuffer&) const; | 196 void flattenToBuffer(SkWriteBuffer&) const; |
| 197 | 197 |
| 198 private: | 198 private: |
| 199 // Only used by getBitmap() if the passed in index is SkBitmapHeap::INVALID_
SLOT. This empty | 199 // Only used by getBitmap() if the passed in index is SkBitmapHeap::INVALID_
SLOT. This empty |
| 200 // bitmap allows playback to draw nothing and move on. | 200 // bitmap allows playback to draw nothing and move on. |
| 201 SkBitmap fBadBitmap; | 201 SkBitmap fBadBitmap; |
| 202 | 202 |
| 203 SkAutoTUnref<SkBitmapHeap> fBitmapHeap; | 203 SkAutoTUnref<SkBitmapHeap> fBitmapHeap; |
| 204 SkAutoTUnref<SkPathHeap> fPathHeap; | 204 SkAutoTUnref<SkPathHeap> fPathHeap; |
| 205 | 205 |
| 206 SkTRefArray<SkBitmap>* fBitmaps; | 206 SkTRefArray<SkBitmap>* fBitmaps; |
| 207 SkTRefArray<SkPaint>* fPaints; | 207 SkTRefArray<SkPaint>* fPaints; |
| 208 | 208 |
| 209 SkData* fOpData; // opcodes and parameters | 209 SkData* fOpData; // opcodes and parameters |
| 210 | 210 |
| 211 SkPicture** fPictureRefs; | 211 SkPicture** fPictureRefs; |
| 212 int fPictureCount; | 212 int fPictureCount; |
| 213 | 213 |
| 214 SkBBoxHierarchy* fBoundingHierarchy; | 214 SkBBoxHierarchy* fBoundingHierarchy; |
| 215 SkPictureStateTree* fStateTree; | 215 SkPictureStateTree* fStateTree; |
| 216 | 216 |
| 217 SkTypefacePlayback fTFPlayback; | 217 SkTypefacePlayback fTFPlayback; |
| 218 SkFactoryPlayback* fFactoryPlayback; | 218 SkFactoryPlayback* fFactoryPlayback; |
| 219 #ifdef SK_BUILD_FOR_ANDROID | 219 #ifdef SK_BUILD_FOR_ANDROID |
| 220 SkMutex fDrawMutex; | 220 SkMutex fDrawMutex; |
| 221 bool fAbortCurrentPlayback; | 221 bool fAbortCurrentPlayback; |
| 222 #endif | 222 #endif |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 #endif | 225 #endif |
| OLD | NEW |