| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 #ifdef SK_BUILD_FOR_ANDROID | 189 #ifdef SK_BUILD_FOR_ANDROID |
| 190 /** Signals that the caller is prematurely done replaying the drawing | 190 /** Signals that the caller is prematurely done replaying the drawing |
| 191 commands. This can be called from a canvas virtual while the picture | 191 commands. This can be called from a canvas virtual while the picture |
| 192 is drawing. Has no effect if the picture is not drawing. | 192 is drawing. Has no effect if the picture is not drawing. |
| 193 @deprecated preserving for legacy purposes | 193 @deprecated preserving for legacy purposes |
| 194 */ | 194 */ |
| 195 void abortPlayback(); | 195 void abortPlayback(); |
| 196 #endif | 196 #endif |
| 197 | 197 |
| 198 protected: | |
| 199 // V2 : adds SkPixelRef's generation ID. | 198 // V2 : adds SkPixelRef's generation ID. |
| 200 // V3 : PictInfo tag at beginning, and EOF tag at the end | 199 // V3 : PictInfo tag at beginning, and EOF tag at the end |
| 201 // V4 : move SkPictInfo to be the header | 200 // V4 : move SkPictInfo to be the header |
| 202 // V5 : don't read/write FunctionPtr on cross-process (we can detect that) | 201 // V5 : don't read/write FunctionPtr on cross-process (we can detect that) |
| 203 // V6 : added serialization of SkPath's bounds (and packed its flags tighter
) | 202 // V6 : added serialization of SkPath's bounds (and packed its flags tighter
) |
| 204 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect) | 203 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect) |
| 205 // V8 : Add an option for encoding bitmaps | 204 // V8 : Add an option for encoding bitmaps |
| 206 // V9 : Allow the reader and writer of an SKP disagree on whether to support | 205 // V9 : Allow the reader and writer of an SKP disagree on whether to support |
| 207 // SK_SUPPORT_HINTING_SCALE_FACTOR | 206 // SK_SUPPORT_HINTING_SCALE_FACTOR |
| 208 // V10: add drawRRect, drawOval, clipRRect | 207 // V10: add drawRRect, drawOval, clipRRect |
| 209 // V11: modify how readBitmap and writeBitmap store their info. | 208 // V11: modify how readBitmap and writeBitmap store their info. |
| 210 // V12: add conics to SkPath, use new SkPathRef flattening | 209 // V12: add conics to SkPath, use new SkPathRef flattening |
| 211 static const uint32_t PICTURE_VERSION = 12; | 210 // V13: parameterize blurs by sigma rather than radius |
| 211 static const uint32_t PICTURE_VERSION = 13; |
| 212 | 212 |
| 213 protected: |
| 213 // fPlayback, fRecord, fWidth & fHeight are protected to allow derived class
es to | 214 // fPlayback, fRecord, fWidth & fHeight are protected to allow derived class
es to |
| 214 // install their own SkPicturePlayback-derived players,SkPictureRecord-deriv
ed | 215 // install their own SkPicturePlayback-derived players,SkPictureRecord-deriv
ed |
| 215 // recorders and set the picture size | 216 // recorders and set the picture size |
| 216 SkPicturePlayback* fPlayback; | 217 SkPicturePlayback* fPlayback; |
| 217 SkPictureRecord* fRecord; | 218 SkPictureRecord* fRecord; |
| 218 int fWidth, fHeight; | 219 int fWidth, fHeight; |
| 219 | 220 |
| 220 // Create a new SkPicture from an existing SkPicturePlayback. Ref count of | 221 // Create a new SkPicture from an existing SkPicturePlayback. Ref count of |
| 221 // playback is unchanged. | 222 // playback is unchanged. |
| 222 SkPicture(SkPicturePlayback*, int width, int height); | 223 SkPicture(SkPicturePlayback*, int width, int height); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 */ | 270 */ |
| 270 class SK_API SkDrawPictureCallback { | 271 class SK_API SkDrawPictureCallback { |
| 271 public: | 272 public: |
| 272 SkDrawPictureCallback() {} | 273 SkDrawPictureCallback() {} |
| 273 virtual ~SkDrawPictureCallback() {} | 274 virtual ~SkDrawPictureCallback() {} |
| 274 | 275 |
| 275 virtual bool abortDrawing() = 0; | 276 virtual bool abortDrawing() = 0; |
| 276 }; | 277 }; |
| 277 | 278 |
| 278 #endif | 279 #endif |
| OLD | NEW |