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

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

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: original write flags were fine Created 6 years, 10 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 SkPaint* addLayerOnTop(const LayerInfo&); 103 SkPaint* addLayerOnTop(const LayerInfo&);
104 104
105 // overrides from SkDrawLooper 105 // overrides from SkDrawLooper
106 virtual void init(SkCanvas*); 106 virtual void init(SkCanvas*);
107 virtual bool next(SkCanvas*, SkPaint* paint); 107 virtual bool next(SkCanvas*, SkPaint* paint);
108 108
109 SK_DEVELOPER_TO_STRING() 109 SK_DEVELOPER_TO_STRING()
110 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerDrawLooper) 110 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerDrawLooper)
111 111
112 protected: 112 protected:
113 SkLayerDrawLooper(SkFlattenableReadBuffer&); 113 SkLayerDrawLooper(SkReadBuffer&);
114 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 114 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
115 115
116 private: 116 private:
117 struct Rec { 117 struct Rec {
118 Rec* fNext; 118 Rec* fNext;
119 SkPaint fPaint; 119 SkPaint fPaint;
120 LayerInfo fInfo; 120 LayerInfo fInfo;
121 }; 121 };
122 Rec* fRecs; 122 Rec* fRecs;
123 Rec* fTopRec; 123 Rec* fTopRec;
124 int fCount; 124 int fCount;
125 125
126 // state-machine during the init/next cycle 126 // state-machine during the init/next cycle
127 Rec* fCurrRec; 127 Rec* fCurrRec;
128 128
129 static void ApplyInfo(SkPaint* dst, const SkPaint& src, const LayerInfo&); 129 static void ApplyInfo(SkPaint* dst, const SkPaint& src, const LayerInfo&);
130 130
131 class MyRegistrar : public SkFlattenable::Registrar { 131 class MyRegistrar : public SkFlattenable::Registrar {
132 public: 132 public:
133 MyRegistrar(); 133 MyRegistrar();
134 }; 134 };
135 135
136 typedef SkDrawLooper INHERITED; 136 typedef SkDrawLooper INHERITED;
137 }; 137 };
138 138
139 #endif 139 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698