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

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

Issue 320873003: change pixelref to not inherit from SkFlattenable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 5 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
« no previous file with comments | « include/core/SkPixelRef.h ('k') | include/gpu/SkGrPixelRef.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 * 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
11 #include "SkBitmapHeap.h" 11 #include "SkBitmapHeap.h"
12 #include "SkColorFilter.h" 12 #include "SkColorFilter.h"
13 #include "SkData.h" 13 #include "SkData.h"
14 #include "SkDrawLooper.h" 14 #include "SkDrawLooper.h"
15 #include "SkImageFilter.h" 15 #include "SkImageFilter.h"
16 #include "SkMaskFilter.h" 16 #include "SkMaskFilter.h"
17 #include "SkPath.h" 17 #include "SkPath.h"
18 #include "SkPathEffect.h" 18 #include "SkPathEffect.h"
19 #include "SkPicture.h" 19 #include "SkPicture.h"
20 #include "SkPixelRef.h"
21 #include "SkRasterizer.h" 20 #include "SkRasterizer.h"
22 #include "SkReadBuffer.h" 21 #include "SkReadBuffer.h"
23 #include "SkReader32.h" 22 #include "SkReader32.h"
24 #include "SkRefCnt.h" 23 #include "SkRefCnt.h"
25 #include "SkShader.h" 24 #include "SkShader.h"
26 #include "SkWriteBuffer.h" 25 #include "SkWriteBuffer.h"
27 #include "SkXfermode.h" 26 #include "SkXfermode.h"
28 27
29 class SkBitmap; 28 class SkBitmap;
30 29
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 111
113 virtual SkFlattenable* readFlattenable(SkFlattenable::Type); 112 virtual SkFlattenable* readFlattenable(SkFlattenable::Type);
114 template <typename T> T* readFlattenable() { 113 template <typename T> T* readFlattenable() {
115 return (T*) this->readFlattenable(T::GetFlattenableType()); 114 return (T*) this->readFlattenable(T::GetFlattenableType());
116 } 115 }
117 SkColorFilter* readColorFilter() { return this->readFlattenable<SkColorFilte r>(); } 116 SkColorFilter* readColorFilter() { return this->readFlattenable<SkColorFilte r>(); }
118 SkDrawLooper* readDrawLooper() { return this->readFlattenable<SkDrawLooper >(); } 117 SkDrawLooper* readDrawLooper() { return this->readFlattenable<SkDrawLooper >(); }
119 SkImageFilter* readImageFilter() { return this->readFlattenable<SkImageFilte r>(); } 118 SkImageFilter* readImageFilter() { return this->readFlattenable<SkImageFilte r>(); }
120 SkMaskFilter* readMaskFilter() { return this->readFlattenable<SkMaskFilter >(); } 119 SkMaskFilter* readMaskFilter() { return this->readFlattenable<SkMaskFilter >(); }
121 SkPathEffect* readPathEffect() { return this->readFlattenable<SkPathEffect >(); } 120 SkPathEffect* readPathEffect() { return this->readFlattenable<SkPathEffect >(); }
122 SkPixelRef* readPixelRef() { return this->readFlattenable<SkPixelRef>( ); }
123 SkRasterizer* readRasterizer() { return this->readFlattenable<SkRasterizer >(); } 121 SkRasterizer* readRasterizer() { return this->readFlattenable<SkRasterizer >(); }
124 SkShader* readShader() { return this->readFlattenable<SkShader>(); } 122 SkShader* readShader() { return this->readFlattenable<SkShader>(); }
125 SkXfermode* readXfermode() { return this->readFlattenable<SkXfermode>( ); } 123 SkXfermode* readXfermode() { return this->readFlattenable<SkXfermode>( ); }
126 124
127 /** 125 /**
128 * Like readFlattenable() but explicitly just skips the data that was writt en for the 126 * Like readFlattenable() but explicitly just skips the data that was writt en for the
129 * flattenable (or the sentinel that there wasn't one). 127 * flattenable (or the sentinel that there wasn't one).
130 */ 128 */
131 virtual void skipFlattenable(); 129 virtual void skipFlattenable();
132 130
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 SkPicture::InstallPixelRefProc fBitmapDecoder; 222 SkPicture::InstallPixelRefProc fBitmapDecoder;
225 223
226 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT 224 #ifdef DEBUG_NON_DETERMINISTIC_ASSERT
227 // Debugging counter to keep track of how many bitmaps we 225 // Debugging counter to keep track of how many bitmaps we
228 // have decoded. 226 // have decoded.
229 int fDecodedBitmapIndex; 227 int fDecodedBitmapIndex;
230 #endif // DEBUG_NON_DETERMINISTIC_ASSERT 228 #endif // DEBUG_NON_DETERMINISTIC_ASSERT
231 }; 229 };
232 230
233 #endif // SkReadBuffer_DEFINED 231 #endif // SkReadBuffer_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkPixelRef.h ('k') | include/gpu/SkGrPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698