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

Side by Side Diff: include/effects/SkLayerDrawLooper.h

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 4 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/effects/SkEmbossMaskFilter.h ('k') | include/effects/SkLayerRasterizer.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 SkLayerDrawLooper_DEFINED 8 #ifndef SkLayerDrawLooper_DEFINED
9 #define SkLayerDrawLooper_DEFINED 9 #define SkLayerDrawLooper_DEFINED
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 }; 74 };
75 75
76 virtual SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const SK_OVERRIDE; 76 virtual SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const SK_OVERRIDE;
77 77
78 virtual size_t contextSize() const SK_OVERRIDE { return sizeof(LayerDrawLoop erContext); } 78 virtual size_t contextSize() const SK_OVERRIDE { return sizeof(LayerDrawLoop erContext); }
79 79
80 virtual bool asABlurShadow(BlurShadowRec* rec) const SK_OVERRIDE; 80 virtual bool asABlurShadow(BlurShadowRec* rec) const SK_OVERRIDE;
81 81
82 SK_TO_STRING_OVERRIDE() 82 SK_TO_STRING_OVERRIDE()
83 83
84 /// Implements Flattenable. 84 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
85 static SkFlattenable* DeepCreateProc(SkReadBuffer& buffer) {
86 return CreateProc(buffer);
87 }
88 virtual Factory getFactory() const SK_OVERRIDE { return DeepCreateProc; }
89 #else
85 virtual Factory getFactory() const SK_OVERRIDE { return CreateProc; } 90 virtual Factory getFactory() const SK_OVERRIDE { return CreateProc; }
91 #endif
86 static SkFlattenable* CreateProc(SkReadBuffer& buffer); 92 static SkFlattenable* CreateProc(SkReadBuffer& buffer);
87 93
88 protected: 94 protected:
89 SkLayerDrawLooper(); 95 SkLayerDrawLooper();
90 96
91 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 97 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
92 98
93 private: 99 private:
94 struct Rec { 100 struct Rec {
95 Rec* fNext; 101 Rec* fNext;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 SkLayerDrawLooper* detachLooper(); 160 SkLayerDrawLooper* detachLooper();
155 161
156 private: 162 private:
157 Rec* fRecs; 163 Rec* fRecs;
158 Rec* fTopRec; 164 Rec* fTopRec;
159 int fCount; 165 int fCount;
160 }; 166 };
161 }; 167 };
162 168
163 #endif 169 #endif
OLDNEW
« no previous file with comments | « include/effects/SkEmbossMaskFilter.h ('k') | include/effects/SkLayerRasterizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698