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

Unified 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, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/gradients.cpp ('k') | include/effects/SkGradientShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPicture.h
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index c8de7daf84b06b8a2d344a80b1df4cf091fa3822..1dcbcc5b7581aced8d05a128225c8313915c2a4f 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -223,10 +223,11 @@ private:
// V46: Add drawTextRSXform
// V47: Add occluder rect to SkBlurMaskFilter
// V48: Read and write extended SkTextBlobs.
+ // V49: Gradients serialized as SkColor4f + SkColorSpace
// Only SKPs within the min/current picture version range (inclusive) can be read.
static const uint32_t MIN_PICTURE_VERSION = 35; // Produced by Chrome M39.
- static const uint32_t CURRENT_PICTURE_VERSION = 48;
+ static const uint32_t CURRENT_PICTURE_VERSION = 49;
static_assert(MIN_PICTURE_VERSION <= 41,
"Remove kFontFileName and related code from SkFontDescriptor.cpp.");
@@ -240,6 +241,9 @@ private:
static_assert(MIN_PICTURE_VERSION <= 45,
"Remove decoding of old SkTypeface::Style from SkFontDescriptor.cpp.");
+ static_assert(MIN_PICTURE_VERSION <= 48,
+ "Remove legacy gradient deserialization code from SkGradientShader.cpp.");
+
static bool IsValidPictInfo(const SkPictInfo& info);
static sk_sp<SkPicture> Forwardport(const SkPictInfo&,
const SkPictureData*,
« 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