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 #ifndef SkPicture_DEFINED | 8 #ifndef SkPicture_DEFINED |
9 #define SkPicture_DEFINED | 9 #define SkPicture_DEFINED |
10 | 10 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // V40: Remove UniqueID serialization from SkImageFilter. | 217 // V40: Remove UniqueID serialization from SkImageFilter. |
218 // V41: Added serialization of SkBitmapSource's filterQuality parameter | 218 // V41: Added serialization of SkBitmapSource's filterQuality parameter |
219 // V42: Added a bool to SkPictureShader serialization to indicate did-we-ser
ialize-a-picture? | 219 // V42: Added a bool to SkPictureShader serialization to indicate did-we-ser
ialize-a-picture? |
220 // V43: Added DRAW_IMAGE and DRAW_IMAGE_RECT opt codes to serialized data | 220 // V43: Added DRAW_IMAGE and DRAW_IMAGE_RECT opt codes to serialized data |
221 // V44: Move annotations from paint to drawAnnotation | 221 // V44: Move annotations from paint to drawAnnotation |
222 // V45: Add invNormRotation to SkLightingShader. | 222 // V45: Add invNormRotation to SkLightingShader. |
223 // V46: Add drawTextRSXform | 223 // V46: Add drawTextRSXform |
224 // V47: Add occluder rect to SkBlurMaskFilter | 224 // V47: Add occluder rect to SkBlurMaskFilter |
225 // V48: Read and write extended SkTextBlobs. | 225 // V48: Read and write extended SkTextBlobs. |
226 // V49: Gradients serialized as SkColor4f + SkColorSpace | 226 // V49: Gradients serialized as SkColor4f + SkColorSpace |
| 227 // V50: SkXfermode -> SkBlendMode |
227 | 228 |
228 // Only SKPs within the min/current picture version range (inclusive) can be
read. | 229 // Only SKPs within the min/current picture version range (inclusive) can be
read. |
229 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrom
e M39. | 230 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrom
e M39. |
230 static const uint32_t CURRENT_PICTURE_VERSION = 49; | 231 static const uint32_t CURRENT_PICTURE_VERSION = 50; |
231 | 232 |
232 static_assert(MIN_PICTURE_VERSION <= 41, | 233 static_assert(MIN_PICTURE_VERSION <= 41, |
233 "Remove kFontFileName and related code from SkFontDescriptor.c
pp."); | 234 "Remove kFontFileName and related code from SkFontDescriptor.c
pp."); |
234 | 235 |
235 static_assert(MIN_PICTURE_VERSION <= 42, | 236 static_assert(MIN_PICTURE_VERSION <= 42, |
236 "Remove COMMENT API handlers from SkPicturePlayback.cpp"); | 237 "Remove COMMENT API handlers from SkPicturePlayback.cpp"); |
237 | 238 |
238 static_assert(MIN_PICTURE_VERSION <= 43, | 239 static_assert(MIN_PICTURE_VERSION <= 43, |
239 "Remove SkBitmapSourceDeserializer."); | 240 "Remove SkBitmapSourceDeserializer."); |
240 | 241 |
241 static_assert(MIN_PICTURE_VERSION <= 45, | 242 static_assert(MIN_PICTURE_VERSION <= 45, |
242 "Remove decoding of old SkTypeface::Style from SkFontDescripto
r.cpp."); | 243 "Remove decoding of old SkTypeface::Style from SkFontDescripto
r.cpp."); |
243 | 244 |
244 static_assert(MIN_PICTURE_VERSION <= 48, | 245 static_assert(MIN_PICTURE_VERSION <= 48, |
245 "Remove legacy gradient deserialization code from SkGradientSh
ader.cpp."); | 246 "Remove legacy gradient deserialization code from SkGradientSh
ader.cpp."); |
246 | 247 |
247 static bool IsValidPictInfo(const SkPictInfo& info); | 248 static bool IsValidPictInfo(const SkPictInfo& info); |
248 static sk_sp<SkPicture> Forwardport(const SkPictInfo&, | 249 static sk_sp<SkPicture> Forwardport(const SkPictInfo&, |
249 const SkPictureData*, | 250 const SkPictureData*, |
250 SkReadBuffer* buffer); | 251 SkReadBuffer* buffer); |
251 | 252 |
252 SkPictInfo createHeader() const; | 253 SkPictInfo createHeader() const; |
253 SkPictureData* backport() const; | 254 SkPictureData* backport() const; |
254 | 255 |
255 mutable uint32_t fUniqueID; | 256 mutable uint32_t fUniqueID; |
256 }; | 257 }; |
257 | 258 |
258 #endif | 259 #endif |
OLD | NEW |