| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 bool initialized; | 55 bool initialized; |
| 56 SkChunkFlatController controller; | 56 SkChunkFlatController controller; |
| 57 SkTDArray<SkFlatData*> paintData; | 57 SkTDArray<SkFlatData*> paintData; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 class SkPicturePlayback { | 60 class SkPicturePlayback { |
| 61 public: | 61 public: |
| 62 SkPicturePlayback(); | 62 SkPicturePlayback(); |
| 63 SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInfo* deepCopyInfo
= NULL); | 63 SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInfo* deepCopyInfo
= NULL); |
| 64 explicit SkPicturePlayback(const SkPictureRecord& record, bool deepCopy = fa
lse); | 64 explicit SkPicturePlayback(const SkPictureRecord& record, bool deepCopy = fa
lse); |
| 65 SkPicturePlayback(SkStream*, const SkPictInfo&, SkPicture::InstallPixelRefPr
oc); | 65 SkPicturePlayback(SkStream*, const SkPictInfo&, bool* isValid, SkPicture::In
stallPixelRefProc); |
| 66 | 66 |
| 67 virtual ~SkPicturePlayback(); | 67 virtual ~SkPicturePlayback(); |
| 68 | 68 |
| 69 void draw(SkCanvas& canvas, SkDrawPictureCallback*); | 69 void draw(SkCanvas& canvas, SkDrawPictureCallback*); |
| 70 | 70 |
| 71 void serialize(SkWStream*, SkPicture::EncodeBitmap) const; | 71 void serialize(SkWStream*, SkPicture::EncodeBitmap) const; |
| 72 | 72 |
| 73 void dumpSize() const; | 73 void dumpSize() const; |
| 74 | 74 |
| 75 #ifdef SK_BUILD_FOR_ANDROID | 75 #ifdef SK_BUILD_FOR_ANDROID |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 int dumpRectPtr(char* bufferPtr, char* buffer, char* name); | 184 int dumpRectPtr(char* bufferPtr, char* buffer, char* name); |
| 185 int dumpScalar(char* bufferPtr, char* buffer, char* name); | 185 int dumpScalar(char* bufferPtr, char* buffer, char* name); |
| 186 void dumpText(char** bufferPtrPtr, char* buffer); | 186 void dumpText(char** bufferPtrPtr, char* buffer); |
| 187 void dumpStream(); | 187 void dumpStream(); |
| 188 | 188 |
| 189 public: | 189 public: |
| 190 void dump() const; | 190 void dump() const; |
| 191 #endif | 191 #endif |
| 192 | 192 |
| 193 private: // these help us with reading/writing | 193 private: // these help us with reading/writing |
| 194 void parseStreamTag(SkStream*, const SkPictInfo&, uint32_t tag, size_t size, | 194 bool parseStreamTag(SkStream*, const SkPictInfo&, uint32_t tag, size_t size, |
| 195 SkPicture::InstallPixelRefProc); | 195 SkPicture::InstallPixelRefProc); |
| 196 void parseBufferTag(SkOrderedReadBuffer&, uint32_t tag, size_t size); | 196 bool parseBufferTag(SkOrderedReadBuffer&, uint32_t tag, size_t size); |
| 197 void flattenToBuffer(SkOrderedWriteBuffer&) const; | 197 void flattenToBuffer(SkOrderedWriteBuffer&) const; |
| 198 | 198 |
| 199 private: | 199 private: |
| 200 // Only used by getBitmap() if the passed in index is SkBitmapHeap::INVALID_
SLOT. This empty | 200 // Only used by getBitmap() if the passed in index is SkBitmapHeap::INVALID_
SLOT. This empty |
| 201 // bitmap allows playback to draw nothing and move on. | 201 // bitmap allows playback to draw nothing and move on. |
| 202 SkBitmap fBadBitmap; | 202 SkBitmap fBadBitmap; |
| 203 | 203 |
| 204 SkAutoTUnref<SkBitmapHeap> fBitmapHeap; | 204 SkAutoTUnref<SkBitmapHeap> fBitmapHeap; |
| 205 SkAutoTUnref<SkPathHeap> fPathHeap; | 205 SkAutoTUnref<SkPathHeap> fPathHeap; |
| 206 | 206 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 219 | 219 |
| 220 SkTypefacePlayback fTFPlayback; | 220 SkTypefacePlayback fTFPlayback; |
| 221 SkFactoryPlayback* fFactoryPlayback; | 221 SkFactoryPlayback* fFactoryPlayback; |
| 222 #ifdef SK_BUILD_FOR_ANDROID | 222 #ifdef SK_BUILD_FOR_ANDROID |
| 223 SkMutex fDrawMutex; | 223 SkMutex fDrawMutex; |
| 224 bool fAbortCurrentPlayback; | 224 bool fAbortCurrentPlayback; |
| 225 #endif | 225 #endif |
| 226 }; | 226 }; |
| 227 | 227 |
| 228 #endif | 228 #endif |
| OLD | NEW |