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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // V40: Remove UniqueID serialization from SkImageFilter. | 246 // V40: Remove UniqueID serialization from SkImageFilter. |
247 // V41: Added serialization of SkBitmapSource's filterQuality parameter | 247 // V41: Added serialization of SkBitmapSource's filterQuality parameter |
248 | 248 |
249 // 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 |
250 // 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 |
251 | 251 |
252 // 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. |
253 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. |
254 static const uint32_t CURRENT_PICTURE_VERSION = 41; | 254 static const uint32_t CURRENT_PICTURE_VERSION = 41; |
255 | 255 |
| 256 static_assert(MIN_PICTURE_VERSION <= 41, |
| 257 "Remove kFontFileName and related code from SkFontDescriptor.c
pp."); |
| 258 |
256 void createHeader(SkPictInfo* info) const; | 259 void createHeader(SkPictInfo* info) const; |
257 static bool IsValidPictInfo(const SkPictInfo& info); | 260 static bool IsValidPictInfo(const SkPictInfo& info); |
258 | 261 |
259 // Takes ownership of the SkRecord and (optional) SnapshotArray, refs the (o
ptional) BBH. | 262 // Takes ownership of the SkRecord and (optional) SnapshotArray, refs the (o
ptional) BBH. |
260 SkPicture(const SkRect& cullRect, SkRecord*, SnapshotArray*, SkBBoxHierarchy
*); | 263 SkPicture(const SkRect& cullRect, SkRecord*, SnapshotArray*, SkBBoxHierarchy
*); |
261 | 264 |
262 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); | 265 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); |
263 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, | 266 static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, |
264 SkPicture const* const drawablePics[], int dr
awableCount); | 267 SkPicture const* const drawablePics[], int dr
awableCount); |
265 | 268 |
(...skipping 29 matching lines...) Expand all Loading... |
295 | 298 |
296 friend class SkPictureRecorder; // SkRecord-based constructor. | 299 friend class SkPictureRecorder; // SkRecord-based constructor. |
297 friend class GrLayerHoister; // access to fRecord | 300 friend class GrLayerHoister; // access to fRecord |
298 friend class ReplaceDraw; | 301 friend class ReplaceDraw; |
299 friend class SkPictureUtils; | 302 friend class SkPictureUtils; |
300 friend class SkRecordedDrawable; | 303 friend class SkRecordedDrawable; |
301 }; | 304 }; |
302 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); | 305 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); |
303 | 306 |
304 #endif | 307 #endif |
OLD | NEW |