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

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

Issue 287063009: Revert of remove unused (by clients) SkUnitMapper (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/core/SkPicture.h ('k') | include/core/SkShader.h » ('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 /* 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
11 11
12 #include "SkBitmapHeap.h" 12 #include "SkBitmapHeap.h"
13 #include "SkColorFilter.h" 13 #include "SkColorFilter.h"
14 #include "SkData.h" 14 #include "SkData.h"
15 #include "SkDrawLooper.h" 15 #include "SkDrawLooper.h"
16 #include "SkImageFilter.h" 16 #include "SkImageFilter.h"
17 #include "SkMaskFilter.h" 17 #include "SkMaskFilter.h"
18 #include "SkPath.h" 18 #include "SkPath.h"
19 #include "SkPathEffect.h" 19 #include "SkPathEffect.h"
20 #include "SkPicture.h" 20 #include "SkPicture.h"
21 #include "SkPixelRef.h" 21 #include "SkPixelRef.h"
22 #include "SkRasterizer.h" 22 #include "SkRasterizer.h"
23 #include "SkReadBuffer.h" 23 #include "SkReadBuffer.h"
24 #include "SkReader32.h" 24 #include "SkReader32.h"
25 #include "SkRefCnt.h" 25 #include "SkRefCnt.h"
26 #include "SkShader.h" 26 #include "SkShader.h"
27 #include "SkUnitMapper.h"
27 #include "SkWriteBuffer.h" 28 #include "SkWriteBuffer.h"
28 #include "SkXfermode.h" 29 #include "SkXfermode.h"
29 30
30 class SkBitmap; 31 class SkBitmap;
31 32
32 #if defined(SK_DEBUG) && defined(SK_BUILD_FOR_MAC) 33 #if defined(SK_DEBUG) && defined(SK_BUILD_FOR_MAC)
33 #define DEBUG_NON_DETERMINISTIC_ASSERT 34 #define DEBUG_NON_DETERMINISTIC_ASSERT
34 #endif 35 #endif
35 36
36 class SkReadBuffer { 37 class SkReadBuffer {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 return (T*) this->readFlattenable(T::GetFlattenableType()); 103 return (T*) this->readFlattenable(T::GetFlattenableType());
103 } 104 }
104 SkColorFilter* readColorFilter() { return this->readFlattenable<SkColorFilte r>(); } 105 SkColorFilter* readColorFilter() { return this->readFlattenable<SkColorFilte r>(); }
105 SkDrawLooper* readDrawLooper() { return this->readFlattenable<SkDrawLooper >(); } 106 SkDrawLooper* readDrawLooper() { return this->readFlattenable<SkDrawLooper >(); }
106 SkImageFilter* readImageFilter() { return this->readFlattenable<SkImageFilte r>(); } 107 SkImageFilter* readImageFilter() { return this->readFlattenable<SkImageFilte r>(); }
107 SkMaskFilter* readMaskFilter() { return this->readFlattenable<SkMaskFilter >(); } 108 SkMaskFilter* readMaskFilter() { return this->readFlattenable<SkMaskFilter >(); }
108 SkPathEffect* readPathEffect() { return this->readFlattenable<SkPathEffect >(); } 109 SkPathEffect* readPathEffect() { return this->readFlattenable<SkPathEffect >(); }
109 SkPixelRef* readPixelRef() { return this->readFlattenable<SkPixelRef>( ); } 110 SkPixelRef* readPixelRef() { return this->readFlattenable<SkPixelRef>( ); }
110 SkRasterizer* readRasterizer() { return this->readFlattenable<SkRasterizer >(); } 111 SkRasterizer* readRasterizer() { return this->readFlattenable<SkRasterizer >(); }
111 SkShader* readShader() { return this->readFlattenable<SkShader>(); } 112 SkShader* readShader() { return this->readFlattenable<SkShader>(); }
113 SkUnitMapper* readUnitMapper() { return this->readFlattenable<SkUnitMapper >(); }
112 SkXfermode* readXfermode() { return this->readFlattenable<SkXfermode>( ); } 114 SkXfermode* readXfermode() { return this->readFlattenable<SkXfermode>( ); }
113 115
114 /**
115 * Like readFlattenable() but explicitly just skips the data that was writt en for the
116 * flattenable (or the sentinel that there wasn't one).
117 */
118 virtual void skipFlattenable();
119 116
120 // binary data and arrays 117 // binary data and arrays
121 virtual bool readByteArray(void* value, size_t size); 118 virtual bool readByteArray(void* value, size_t size);
122 virtual bool readColorArray(SkColor* colors, size_t size); 119 virtual bool readColorArray(SkColor* colors, size_t size);
123 virtual bool readIntArray(int32_t* values, size_t size); 120 virtual bool readIntArray(int32_t* values, size_t size);
124 virtual bool readPointArray(SkPoint* points, size_t size); 121 virtual bool readPointArray(SkPoint* points, size_t size);
125 virtual bool readScalarArray(SkScalar* values, size_t size); 122 virtual bool readScalarArray(SkScalar* values, size_t size);
126 123
127 SkData* readByteArrayAsData() { 124 SkData* readByteArrayAsData() {
128 size_t len = this->getArrayCount(); 125 size_t len = this->getArrayCount();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 SkPicture::InstallPixelRefProc fBitmapDecoder; 203 SkPicture::InstallPixelRefProc fBitmapDecoder;
207 204
208 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT 205 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT
209 // Debugging counter to keep track of how many bitmaps we 206 // Debugging counter to keep track of how many bitmaps we
210 // have decoded. 207 // have decoded.
211 int fDecodedBitmapIndex; 208 int fDecodedBitmapIndex;
212 #endif // DEBUG_NON_DETERMINISTIC_ASSERT 209 #endif // DEBUG_NON_DETERMINISTIC_ASSERT
213 }; 210 };
214 211
215 #endif // SkReadBuffer_DEFINED 212 #endif // SkReadBuffer_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | include/core/SkShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698