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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // V33: Serialize only public API of effects. | 244 // V33: Serialize only public API of effects. |
245 // V34: Add SkTextBlob serialization. | 245 // V34: Add SkTextBlob serialization. |
246 // V35: Store SkRect (rather then width & height) in header | 246 // V35: Store SkRect (rather then width & height) in header |
247 // V36: Remove (obsolete) alphatype from SkColorTable | 247 // V36: Remove (obsolete) alphatype from SkColorTable |
248 // V37: Added shadow only option to SkDropShadowImageFilter | 248 // V37: Added shadow only option to SkDropShadowImageFilter |
249 | 249 |
250 // Note: If the picture version needs to be increased then please follow the | 250 // Note: If the picture version needs to be increased then please follow the |
251 // steps to generate new SKPs in (only accessible to Googlers): http://goo.g
l/qATVcw | 251 // steps to generate new SKPs in (only accessible to Googlers): http://goo.g
l/qATVcw |
252 | 252 |
253 // Only SKPs within the min/current picture version range (inclusive) can be
read. | 253 // Only SKPs within the min/current picture version range (inclusive) can be
read. |
254 static const uint32_t MIN_PICTURE_VERSION = 19; | 254 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrome M3
9. |
255 static const uint32_t CURRENT_PICTURE_VERSION = 37; | 255 static const uint32_t CURRENT_PICTURE_VERSION = 37; |
256 | 256 |
257 void createHeader(SkPictInfo* info) const; | 257 void createHeader(SkPictInfo* info) const; |
258 static bool IsValidPictInfo(const SkPictInfo& info); | 258 static bool IsValidPictInfo(const SkPictInfo& info); |
259 | 259 |
260 // Takes ownership of the SkRecord and (optional) SnapshotArray, refs the (o
ptional) BBH. | 260 // Takes ownership of the SkRecord and (optional) SnapshotArray, refs the (o
ptional) BBH. |
261 SkPicture(const SkRect& cullRect, SkRecord*, SnapshotArray*, SkBBoxHierarchy
*); | 261 SkPicture(const SkRect& cullRect, SkRecord*, SnapshotArray*, SkBBoxHierarchy
*); |
262 | 262 |
263 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); | 263 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); |
264 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, | 264 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 296 |
297 friend class SkPictureRecorder; // SkRecord-based constructor. | 297 friend class SkPictureRecorder; // SkRecord-based constructor. |
298 friend class GrLayerHoister; // access to fRecord | 298 friend class GrLayerHoister; // access to fRecord |
299 friend class ReplaceDraw; | 299 friend class ReplaceDraw; |
300 friend class SkPictureUtils; | 300 friend class SkPictureUtils; |
301 friend class SkRecordedDrawable; | 301 friend class SkRecordedDrawable; |
302 }; | 302 }; |
303 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); | 303 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); |
304 | 304 |
305 #endif | 305 #endif |
OLD | NEW |