Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: include/core/SkPicture.h

Issue 2370063002: Gradients are serialized (and can be constructed) as SkColor4f + SkColorSpace (Closed)
Patch Set: Widen storage for flags. Shift used bits to be contiguous. Document layout. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/gradients.cpp ('k') | include/effects/SkGradientShader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // V39: Added FilterLevel option to SkPictureImageFilter 216 // V39: Added FilterLevel option to SkPictureImageFilter
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 227
227 // Only SKPs within the min/current picture version range (inclusive) can be read. 228 // Only SKPs within the min/current picture version range (inclusive) can be read.
228 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrom e M39. 229 static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrom e M39.
229 static const uint32_t CURRENT_PICTURE_VERSION = 48; 230 static const uint32_t CURRENT_PICTURE_VERSION = 49;
230 231
231 static_assert(MIN_PICTURE_VERSION <= 41, 232 static_assert(MIN_PICTURE_VERSION <= 41,
232 "Remove kFontFileName and related code from SkFontDescriptor.c pp."); 233 "Remove kFontFileName and related code from SkFontDescriptor.c pp.");
233 234
234 static_assert(MIN_PICTURE_VERSION <= 42, 235 static_assert(MIN_PICTURE_VERSION <= 42,
235 "Remove COMMENT API handlers from SkPicturePlayback.cpp"); 236 "Remove COMMENT API handlers from SkPicturePlayback.cpp");
236 237
237 static_assert(MIN_PICTURE_VERSION <= 43, 238 static_assert(MIN_PICTURE_VERSION <= 43,
238 "Remove SkBitmapSourceDeserializer."); 239 "Remove SkBitmapSourceDeserializer.");
239 240
240 static_assert(MIN_PICTURE_VERSION <= 45, 241 static_assert(MIN_PICTURE_VERSION <= 45,
241 "Remove decoding of old SkTypeface::Style from SkFontDescripto r.cpp."); 242 "Remove decoding of old SkTypeface::Style from SkFontDescripto r.cpp.");
242 243
244 static_assert(MIN_PICTURE_VERSION <= 48,
245 "Remove legacy gradient deserialization code from SkGradientSh ader.cpp.");
246
243 static bool IsValidPictInfo(const SkPictInfo& info); 247 static bool IsValidPictInfo(const SkPictInfo& info);
244 static sk_sp<SkPicture> Forwardport(const SkPictInfo&, 248 static sk_sp<SkPicture> Forwardport(const SkPictInfo&,
245 const SkPictureData*, 249 const SkPictureData*,
246 const SkReadBuffer* buffer); 250 const SkReadBuffer* buffer);
247 251
248 SkPictInfo createHeader() const; 252 SkPictInfo createHeader() const;
249 SkPictureData* backport() const; 253 SkPictureData* backport() const;
250 254
251 mutable uint32_t fUniqueID; 255 mutable uint32_t fUniqueID;
252 }; 256 };
253 257
254 #endif 258 #endif
OLDNEW
« no previous file with comments | « gm/gradients.cpp ('k') | include/effects/SkGradientShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698