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

Unified Diff: include/core/SkReadBuffer.h

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
« no previous file with comments | « no previous file | src/core/SkPaint.cpp » ('j') | src/effects/SkDashPathEffect.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkReadBuffer.h
diff --git a/include/core/SkReadBuffer.h b/include/core/SkReadBuffer.h
index dfd92eedc0c26d986585d85019af1b27191e2568..9b897484fdb102da582f4afa09caa4dc914bca5b 100644
--- a/include/core/SkReadBuffer.h
+++ b/include/core/SkReadBuffer.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
@@ -42,7 +41,23 @@ public:
virtual ~SkReadBuffer();
robertphillips 2014/05/20 12:34:06 Remove these two lines?
reed1 2014/05/20 17:21:57 Done.
/** Return the version of the serialized picture this buffer holds, or 0 if unset. */
- int pictureVersion() const { return fPictureVersion; }
+ // int pictureVersion() const { return fPictureVersion; }
+
robertphillips 2014/05/20 12:34:06 intended ? users ?
reed1 2014/05/20 17:21:57 Done.
+ // Just indended for internal uses who query pictureVersionLT()
+ enum PictureVersion {
+ kFilterLevelIsEnum_PictureVersion = 23,
+ kGradientFlippedFlag_PictureVersion = 24,
+ kDashWritesPhaseIntervals_PictureVersion = 25,
+ kColorShaderNoBool_PictureVersion = 26,
+ };
+
+ /**
robertphillips 2014/05/20 12:34:06 Returns ?
reed1 2014/05/20 17:21:57 Done.
+ * Retruns true IFF the picture version is older than the specified version.
+ */
+ bool pictureVersionLT(PictureVersion targetVersion) const {
+ SkASSERT(targetVersion > 0);
+ return fPictureVersion > 0 && fPictureVersion < targetVersion;
+ }
/** This may be called at most once; most clients of SkReadBuffer should not mess with it. */
void setPictureVersion(int version) {
« no previous file with comments | « no previous file | src/core/SkPaint.cpp » ('j') | src/effects/SkDashPathEffect.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698