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

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

Issue 226743004: Relax the assert in SkReadBuffer::setPictureVersion(). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef SkReadBuffer_DEFINED 9 #ifndef SkReadBuffer_DEFINED
10 #define SkReadBuffer_DEFINED 10 #define SkReadBuffer_DEFINED
(...skipping 28 matching lines...) Expand all
39 SkReadBuffer(); 39 SkReadBuffer();
40 SkReadBuffer(const void* data, size_t size); 40 SkReadBuffer(const void* data, size_t size);
41 SkReadBuffer(SkStream* stream); 41 SkReadBuffer(SkStream* stream);
42 virtual ~SkReadBuffer(); 42 virtual ~SkReadBuffer();
43 43
44 /** Return the version of the serialized picture this buffer holds, or 0 if unset. */ 44 /** Return the version of the serialized picture this buffer holds, or 0 if unset. */
45 int pictureVersion() const { return fPictureVersion; } 45 int pictureVersion() const { return fPictureVersion; }
46 46
47 /** This may be called at most once; most clients of SkReadBuffer should not mess with it. */ 47 /** This may be called at most once; most clients of SkReadBuffer should not mess with it. */
48 void setPictureVersion(int version) { 48 void setPictureVersion(int version) {
49 SkASSERT(0 == fPictureVersion); 49 SkASSERT(0 == fPictureVersion || version == fPictureVersion);
50 fPictureVersion = version; 50 fPictureVersion = version;
51 } 51 }
52 52
53 enum Flags { 53 enum Flags {
54 kCrossProcess_Flag = 1 << 0, 54 kCrossProcess_Flag = 1 << 0,
55 kScalarIsFloat_Flag = 1 << 1, 55 kScalarIsFloat_Flag = 1 << 1,
56 kPtrIs64Bit_Flag = 1 << 2, 56 kPtrIs64Bit_Flag = 1 << 2,
57 kValidation_Flag = 1 << 3, 57 kValidation_Flag = 1 << 3,
58 }; 58 };
59 59
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 SkPicture::InstallPixelRefProc fBitmapDecoder; 208 SkPicture::InstallPixelRefProc fBitmapDecoder;
209 209
210 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT 210 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT
211 // Debugging counter to keep track of how many bitmaps we 211 // Debugging counter to keep track of how many bitmaps we
212 // have decoded. 212 // have decoded.
213 int fDecodedBitmapIndex; 213 int fDecodedBitmapIndex;
214 #endif // DEBUG_NON_DETERMINISTIC_ASSERT 214 #endif // DEBUG_NON_DETERMINISTIC_ASSERT
215 }; 215 };
216 216
217 #endif // SkReadBuffer_DEFINED 217 #endif // SkReadBuffer_DEFINED
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698