OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #ifndef SkPicture_DEFINED | 9 #ifndef SkPicture_DEFINED |
10 #define SkPicture_DEFINED | 10 #define SkPicture_DEFINED |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // V30: Remove redundant SkMatrix from SkLocalMatrixShader. | 236 // V30: Remove redundant SkMatrix from SkLocalMatrixShader. |
237 // V31: Add a serialized UniqueID to SkImageFilter. | 237 // V31: Add a serialized UniqueID to SkImageFilter. |
238 // V32: Removed SkPaintOptionsAndroid from SkPaint | 238 // V32: Removed SkPaintOptionsAndroid from SkPaint |
239 // V33: Serialize only public API of effects. | 239 // V33: Serialize only public API of effects. |
240 // V34: Add SkTextBlob serialization. | 240 // V34: Add SkTextBlob serialization. |
241 // V35: Store SkRect (rather then width & height) in header | 241 // V35: Store SkRect (rather then width & height) in header |
242 // V36: Remove (obsolete) alphatype from SkColorTable | 242 // V36: Remove (obsolete) alphatype from SkColorTable |
243 // V37: Added shadow only option to SkDropShadowImageFilter (last version to
record CLEAR) | 243 // V37: Added shadow only option to SkDropShadowImageFilter (last version to
record CLEAR) |
244 // V38: Added PictureResolution option to SkPictureImageFilter | 244 // V38: Added PictureResolution option to SkPictureImageFilter |
245 // V39: Added FilterLevel option to SkPictureImageFilter | 245 // V39: Added FilterLevel option to SkPictureImageFilter |
| 246 // V40: Remove UniqueID serialization from SkImageFilter. |
246 | 247 |
247 // Note: If the picture version needs to be increased then please follow the | 248 // Note: If the picture version needs to be increased then please follow the |
248 // steps to generate new SKPs in (only accessible to Googlers): http://goo.g
l/qATVcw | 249 // steps to generate new SKPs in (only accessible to Googlers): http://goo.g
l/qATVcw |
249 | 250 |
250 // Only SKPs within the min/current picture version range (inclusive) can be
read. | 251 // Only SKPs within the min/current picture version range (inclusive) can be
read. |
251 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrome M3
9. | 252 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrome M3
9. |
252 static const uint32_t CURRENT_PICTURE_VERSION = 39; | 253 static const uint32_t CURRENT_PICTURE_VERSION = 40; |
253 | 254 |
254 void createHeader(SkPictInfo* info) const; | 255 void createHeader(SkPictInfo* info) const; |
255 static bool IsValidPictInfo(const SkPictInfo& info); | 256 static bool IsValidPictInfo(const SkPictInfo& info); |
256 | 257 |
257 // Takes ownership of the SkRecord and (optional) SnapshotArray, refs the (o
ptional) BBH. | 258 // Takes ownership of the SkRecord and (optional) SnapshotArray, refs the (o
ptional) BBH. |
258 SkPicture(const SkRect& cullRect, SkRecord*, SnapshotArray*, SkBBoxHierarchy
*); | 259 SkPicture(const SkRect& cullRect, SkRecord*, SnapshotArray*, SkBBoxHierarchy
*); |
259 | 260 |
260 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); | 261 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); |
261 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, | 262 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, |
262 SkPicture const* const drawablePics[], int dr
awableCount); | 263 SkPicture const* const drawablePics[], int dr
awableCount); |
(...skipping 30 matching lines...) Expand all Loading... |
293 | 294 |
294 friend class SkPictureRecorder; // SkRecord-based constructor. | 295 friend class SkPictureRecorder; // SkRecord-based constructor. |
295 friend class GrLayerHoister; // access to fRecord | 296 friend class GrLayerHoister; // access to fRecord |
296 friend class ReplaceDraw; | 297 friend class ReplaceDraw; |
297 friend class SkPictureUtils; | 298 friend class SkPictureUtils; |
298 friend class SkRecordedDrawable; | 299 friend class SkRecordedDrawable; |
299 }; | 300 }; |
300 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); | 301 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); |
301 | 302 |
302 #endif | 303 #endif |
OLD | NEW |