OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
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 | 8 |
9 | 9 |
10 #ifndef SkPicture_DEFINED | 10 #ifndef SkPicture_DEFINED |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 #ifdef SK_BUILD_FOR_ANDROID | 186 #ifdef SK_BUILD_FOR_ANDROID |
187 /** Signals that the caller is prematurely done replaying the drawing | 187 /** Signals that the caller is prematurely done replaying the drawing |
188 commands. This can be called from a canvas virtual while the picture | 188 commands. This can be called from a canvas virtual while the picture |
189 is drawing. Has no effect if the picture is not drawing. | 189 is drawing. Has no effect if the picture is not drawing. |
190 @deprecated preserving for legacy purposes | 190 @deprecated preserving for legacy purposes |
191 */ | 191 */ |
192 void abortPlayback(); | 192 void abortPlayback(); |
193 #endif | 193 #endif |
194 | 194 |
195 protected: | |
196 // V2 : adds SkPixelRef's generation ID. | 195 // V2 : adds SkPixelRef's generation ID. |
197 // V3 : PictInfo tag at beginning, and EOF tag at the end | 196 // V3 : PictInfo tag at beginning, and EOF tag at the end |
198 // V4 : move SkPictInfo to be the header | 197 // V4 : move SkPictInfo to be the header |
199 // V5 : don't read/write FunctionPtr on cross-process (we can detect that) | 198 // V5 : don't read/write FunctionPtr on cross-process (we can detect that) |
200 // V6 : added serialization of SkPath's bounds (and packed its flags tighter
) | 199 // V6 : added serialization of SkPath's bounds (and packed its flags tighter
) |
201 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect) | 200 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect) |
202 // V8 : Add an option for encoding bitmaps | 201 // V8 : Add an option for encoding bitmaps |
203 // V9 : Allow the reader and writer of an SKP disagree on whether to support | 202 // V9 : Allow the reader and writer of an SKP disagree on whether to support |
204 // SK_SUPPORT_HINTING_SCALE_FACTOR | 203 // SK_SUPPORT_HINTING_SCALE_FACTOR |
205 // V10: add drawRRect, drawOval, clipRRect | 204 // V10: add drawRRect, drawOval, clipRRect |
206 // V11: modify how readBitmap and writeBitmap store their info. | 205 // V11: modify how readBitmap and writeBitmap store their info. |
207 static const uint32_t PICTURE_VERSION = 11; | 206 static const uint32_t PICTURE_VERSION = 11; |
208 | 207 |
| 208 protected: |
209 // fPlayback, fRecord, fWidth & fHeight are protected to allow derived class
es to | 209 // fPlayback, fRecord, fWidth & fHeight are protected to allow derived class
es to |
210 // install their own SkPicturePlayback-derived players,SkPictureRecord-deriv
ed | 210 // install their own SkPicturePlayback-derived players,SkPictureRecord-deriv
ed |
211 // recorders and set the picture size | 211 // recorders and set the picture size |
212 SkPicturePlayback* fPlayback; | 212 SkPicturePlayback* fPlayback; |
213 SkPictureRecord* fRecord; | 213 SkPictureRecord* fRecord; |
214 int fWidth, fHeight; | 214 int fWidth, fHeight; |
215 | 215 |
216 // For testing. Derived classes may instantiate an alternate | 216 // For testing. Derived classes may instantiate an alternate |
217 // SkBBoxHierarchy implementation | 217 // SkBBoxHierarchy implementation |
218 virtual SkBBoxHierarchy* createBBoxHierarchy() const; | 218 virtual SkBBoxHierarchy* createBBoxHierarchy() const; |
(...skipping 22 matching lines...) Expand all Loading... |
241 */ | 241 */ |
242 SkCanvas* getRecordingCanvas() const { return fCanvas; } | 242 SkCanvas* getRecordingCanvas() const { return fCanvas; } |
243 | 243 |
244 private: | 244 private: |
245 SkPicture* fPicture; | 245 SkPicture* fPicture; |
246 SkCanvas* fCanvas; | 246 SkCanvas* fCanvas; |
247 }; | 247 }; |
248 | 248 |
249 | 249 |
250 #endif | 250 #endif |
OLD | NEW |