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

Side by Side Diff: src/core/SkReadBuffer.h

Issue 770703002: Bump min picture version. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: TODO Created 6 years 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 | « src/core/SkPictureData.cpp ('k') | src/core/SkReadBuffer.cpp » ('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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 SkReadBuffer_DEFINED 8 #ifndef SkReadBuffer_DEFINED
9 #define SkReadBuffer_DEFINED 9 #define SkReadBuffer_DEFINED
10 10
(...skipping 21 matching lines...) Expand all
32 #endif 32 #endif
33 33
34 class SkReadBuffer { 34 class SkReadBuffer {
35 public: 35 public:
36 SkReadBuffer(); 36 SkReadBuffer();
37 SkReadBuffer(const void* data, size_t size); 37 SkReadBuffer(const void* data, size_t size);
38 SkReadBuffer(SkStream* stream); 38 SkReadBuffer(SkStream* stream);
39 virtual ~SkReadBuffer(); 39 virtual ~SkReadBuffer();
40 40
41 enum Version { 41 enum Version {
42 /*
42 kFilterLevelIsEnum_Version = 23, 43 kFilterLevelIsEnum_Version = 23,
43 kGradientFlippedFlag_Version = 24, 44 kGradientFlippedFlag_Version = 24,
44 kDashWritesPhaseIntervals_Version = 25, 45 kDashWritesPhaseIntervals_Version = 25,
45 kColorShaderNoBool_Version = 26, 46 kColorShaderNoBool_Version = 26,
46 kNoUnitMappers_Version = 27, 47 kNoUnitMappers_Version = 27,
47 kNoMoreBitmapFlatten_Version = 28, 48 kNoMoreBitmapFlatten_Version = 28,
48 kSimplifyLocalMatrix_Version = 30, 49 kSimplifyLocalMatrix_Version = 30,
49 kImageFilterUniqueID_Version = 31, 50 kImageFilterUniqueID_Version = 31,
50 kRemoveAndroidPaintOpts_Version = 32, 51 kRemoveAndroidPaintOpts_Version = 32,
51 kFlattenCreateProc_Version = 33, 52 kFlattenCreateProc_Version = 33,
53 */
52 kRemoveColorTableAlpha_Version = 36, 54 kRemoveColorTableAlpha_Version = 36,
53 kDropShadowMode_Version = 37, 55 kDropShadowMode_Version = 37,
54 }; 56 };
55 57
56 /** 58 /**
57 * Returns true IFF the version is older than the specified version. 59 * Returns true IFF the version is older than the specified version.
58 */ 60 */
59 bool isVersionLT(Version targetVersion) const { 61 bool isVersionLT(Version targetVersion) const {
60 SkASSERT(targetVersion > 0); 62 SkASSERT(targetVersion > 0);
61 return fVersion > 0 && fVersion < targetVersion; 63 return fVersion > 0 && fVersion < targetVersion;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 virtual void readString(SkString* string); 107 virtual void readString(SkString* string);
106 virtual void* readEncodedString(size_t* length, SkPaint::TextEncoding encodi ng); 108 virtual void* readEncodedString(size_t* length, SkPaint::TextEncoding encodi ng);
107 109
108 // common data structures 110 // common data structures
109 virtual void readPoint(SkPoint* point); 111 virtual void readPoint(SkPoint* point);
110 SkPoint readPoint() { SkPoint p; this->readPoint(&p); return p; } 112 SkPoint readPoint() { SkPoint p; this->readPoint(&p); return p; }
111 virtual void readMatrix(SkMatrix* matrix); 113 virtual void readMatrix(SkMatrix* matrix);
112 virtual void readIRect(SkIRect* rect); 114 virtual void readIRect(SkIRect* rect);
113 virtual void readRect(SkRect* rect); 115 virtual void readRect(SkRect* rect);
114 virtual void readRegion(SkRegion* region); 116 virtual void readRegion(SkRegion* region);
115 117
116 virtual void readPath(SkPath* path); 118 virtual void readPath(SkPath* path);
117 void readPaint(SkPaint* paint) { paint->unflatten(*this); } 119 void readPaint(SkPaint* paint) { paint->unflatten(*this); }
118 120
119 virtual SkFlattenable* readFlattenable(SkFlattenable::Type); 121 virtual SkFlattenable* readFlattenable(SkFlattenable::Type);
120 template <typename T> T* readFlattenable() { 122 template <typename T> T* readFlattenable() {
121 return (T*) this->readFlattenable(T::GetFlattenableType()); 123 return (T*) this->readFlattenable(T::GetFlattenableType());
122 } 124 }
123 SkColorFilter* readColorFilter() { return this->readFlattenable<SkColorFilte r>(); } 125 SkColorFilter* readColorFilter() { return this->readFlattenable<SkColorFilte r>(); }
124 SkDrawLooper* readDrawLooper() { return this->readFlattenable<SkDrawLooper >(); } 126 SkDrawLooper* readDrawLooper() { return this->readFlattenable<SkDrawLooper >(); }
125 SkImageFilter* readImageFilter() { return this->readFlattenable<SkImageFilte r>(); } 127 SkImageFilter* readImageFilter() { return this->readFlattenable<SkImageFilte r>(); }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 SkPicture::InstallPixelRefProc fBitmapDecoder; 231 SkPicture::InstallPixelRefProc fBitmapDecoder;
230 232
231 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT 233 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT
232 // Debugging counter to keep track of how many bitmaps we 234 // Debugging counter to keep track of how many bitmaps we
233 // have decoded. 235 // have decoded.
234 int fDecodedBitmapIndex; 236 int fDecodedBitmapIndex;
235 #endif // DEBUG_NON_DETERMINISTIC_ASSERT 237 #endif // DEBUG_NON_DETERMINISTIC_ASSERT
236 }; 238 };
237 239
238 #endif // SkReadBuffer_DEFINED 240 #endif // SkReadBuffer_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkPictureData.cpp ('k') | src/core/SkReadBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698