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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 void dumpSize() const; | 73 void dumpSize() const; |
74 | 74 |
75 #ifdef SK_BUILD_FOR_ANDROID | 75 #ifdef SK_BUILD_FOR_ANDROID |
76 // Can be called in the middle of playback (the draw() call). WIll abort the | 76 // Can be called in the middle of playback (the draw() call). WIll abort the |
77 // drawing and return from draw() after the "current" op code is done | 77 // drawing and return from draw() after the "current" op code is done |
78 void abort() { fAbortCurrentPlayback = true; } | 78 void abort() { fAbortCurrentPlayback = true; } |
79 #endif | 79 #endif |
80 | 80 |
81 protected: | 81 protected: |
82 #ifdef SK_DEVELOPER | 82 #ifdef SK_DEVELOPER |
83 virtual size_t preDraw(size_t offset, int type); | 83 virtual bool preDraw(int opNum, int type); |
84 virtual void postDraw(size_t offset); | 84 virtual void postDraw(int opNum); |
85 #endif | 85 #endif |
86 | 86 |
87 private: | 87 private: |
88 class TextContainer { | 88 class TextContainer { |
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 }; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |