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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 public: | 89 public: |
90 size_t length() { return fByteLength; } | 90 size_t length() { return fByteLength; } |
91 const void* text() { return (const void*) fText; } | 91 const void* text() { return (const void*) fText; } |
92 size_t fByteLength; | 92 size_t fByteLength; |
93 const char* fText; | 93 const char* fText; |
94 }; | 94 }; |
95 | 95 |
96 const SkBitmap& getBitmap(SkReader32& reader) { | 96 const SkBitmap& getBitmap(SkReader32& reader) { |
97 const int index = reader.readInt(); | 97 const int index = reader.readInt(); |
98 if (SkBitmapHeap::INVALID_SLOT == index) { | 98 if (SkBitmapHeap::INVALID_SLOT == index) { |
| 99 #ifdef SK_DEBUG |
99 SkDebugf("An invalid bitmap was recorded!\n"); | 100 SkDebugf("An invalid bitmap was recorded!\n"); |
| 101 #endif |
100 return fBadBitmap; | 102 return fBadBitmap; |
101 } | 103 } |
102 return (*fBitmaps)[index]; | 104 return (*fBitmaps)[index]; |
103 } | 105 } |
104 | 106 |
105 const SkMatrix* getMatrix(SkReader32& reader) { | 107 const SkMatrix* getMatrix(SkReader32& reader) { |
106 int index = reader.readInt(); | 108 int index = reader.readInt(); |
107 if (index == 0) { | 109 if (index == 0) { |
108 return NULL; | 110 return NULL; |
109 } | 111 } |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 219 |
218 SkTypefacePlayback fTFPlayback; | 220 SkTypefacePlayback fTFPlayback; |
219 SkFactoryPlayback* fFactoryPlayback; | 221 SkFactoryPlayback* fFactoryPlayback; |
220 #ifdef SK_BUILD_FOR_ANDROID | 222 #ifdef SK_BUILD_FOR_ANDROID |
221 SkMutex fDrawMutex; | 223 SkMutex fDrawMutex; |
222 bool fAbortCurrentPlayback; | 224 bool fAbortCurrentPlayback; |
223 #endif | 225 #endif |
224 }; | 226 }; |
225 | 227 |
226 #endif | 228 #endif |
OLD | NEW |