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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // V40: Remove UniqueID serialization from SkImageFilter. |
| 247 // V41: Added serialization of SkBitmapSource's filterQuality parameter |
247 | 248 |
248 // Note: If the picture version needs to be increased then please follow the | 249 // Note: If the picture version needs to be increased then please follow the |
249 // steps to generate new SKPs in (only accessible to Googlers): http://goo.g
l/qATVcw | 250 // steps to generate new SKPs in (only accessible to Googlers): http://goo.g
l/qATVcw |
250 | 251 |
251 // Only SKPs within the min/current picture version range (inclusive) can be
read. | 252 // Only SKPs within the min/current picture version range (inclusive) can be
read. |
252 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrome M3
9. | 253 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrome M3
9. |
253 static const uint32_t CURRENT_PICTURE_VERSION = 40; | 254 static const uint32_t CURRENT_PICTURE_VERSION = 41; |
254 | 255 |
255 void createHeader(SkPictInfo* info) const; | 256 void createHeader(SkPictInfo* info) const; |
256 static bool IsValidPictInfo(const SkPictInfo& info); | 257 static bool IsValidPictInfo(const SkPictInfo& info); |
257 | 258 |
258 // Takes ownership of the SkRecord and (optional) SnapshotArray, refs the (o
ptional) BBH. | 259 // Takes ownership of the SkRecord and (optional) SnapshotArray, refs the (o
ptional) BBH. |
259 SkPicture(const SkRect& cullRect, SkRecord*, SnapshotArray*, SkBBoxHierarchy
*); | 260 SkPicture(const SkRect& cullRect, SkRecord*, SnapshotArray*, SkBBoxHierarchy
*); |
260 | 261 |
261 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); | 262 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); |
262 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, | 263 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, |
263 SkPicture const* const drawablePics[], int dr
awableCount); | 264 SkPicture const* const drawablePics[], int dr
awableCount); |
(...skipping 30 matching lines...) Expand all Loading... |
294 | 295 |
295 friend class SkPictureRecorder; // SkRecord-based constructor. | 296 friend class SkPictureRecorder; // SkRecord-based constructor. |
296 friend class GrLayerHoister; // access to fRecord | 297 friend class GrLayerHoister; // access to fRecord |
297 friend class ReplaceDraw; | 298 friend class ReplaceDraw; |
298 friend class SkPictureUtils; | 299 friend class SkPictureUtils; |
299 friend class SkRecordedDrawable; | 300 friend class SkRecordedDrawable; |
300 }; | 301 }; |
301 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); | 302 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); |
302 | 303 |
303 #endif | 304 #endif |
OLD | NEW |