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

Unified Diff: src/core/SkPaint.cpp

Issue 291913004: formalize named picture versions (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 7ac2f076b1fafb7f62f2e4c43537e6a9b2de3f60..ef7e030639da92ef2d0b1b4533c9179f40931453 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2006 The Android Open Source Project
*
@@ -2182,9 +2181,8 @@ void SkPaint::unflatten(SkReadBuffer& buffer) {
this->setStrokeMiter(read_scalar(pod));
this->setColor(*pod++);
- const int picVer = buffer.pictureVersion();
unsigned flatFlags = 0;
- if (picVer > 0 && picVer <= 22) {
+ if (buffer.pictureVersionLT(SkReadBuffer::kFilterLevelIsEnum_PictureVersion)) {
flatFlags = unpack_paint_flags_v22(this, *pod++);
} else {
flatFlags = unpack_paint_flags(this, *pod++);

Powered by Google App Engine
This is Rietveld 408576698