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

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

Issue 768183002: Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/SkMaskFilter.h ('k') | include/core/SkRasterizer.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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 9
10 #ifndef SkPathEffect_DEFINED 10 #ifndef SkPathEffect_DEFINED
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 SkScalar fPhase; //!< Offset into the dashed interval pat tern 128 SkScalar fPhase; //!< Offset into the dashed interval pat tern
129 // mod the sum of all intervals 129 // mod the sum of all intervals
130 }; 130 };
131 131
132 virtual DashType asADash(DashInfo* info) const; 132 virtual DashType asADash(DashInfo* info) const;
133 133
134 SK_DEFINE_FLATTENABLE_TYPE(SkPathEffect) 134 SK_DEFINE_FLATTENABLE_TYPE(SkPathEffect)
135 135
136 protected: 136 protected:
137 SkPathEffect() {} 137 SkPathEffect() {}
138 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
139 SkPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {}
140 #endif
138 141
139 private: 142 private:
140 // illegal 143 // illegal
141 SkPathEffect(const SkPathEffect&); 144 SkPathEffect(const SkPathEffect&);
142 SkPathEffect& operator=(const SkPathEffect&); 145 SkPathEffect& operator=(const SkPathEffect&);
143 146
144 typedef SkFlattenable INHERITED; 147 typedef SkFlattenable INHERITED;
145 }; 148 };
146 149
147 /** \class SkPairPathEffect 150 /** \class SkPairPathEffect
148 151
149 Common baseclass for Compose and Sum. This subclass manages two pathEffects, 152 Common baseclass for Compose and Sum. This subclass manages two pathEffects,
150 including flattening them. It does nothing in filterPath, and is only useful 153 including flattening them. It does nothing in filterPath, and is only useful
151 for managing the lifetimes of its two arguments. 154 for managing the lifetimes of its two arguments.
152 */ 155 */
153 class SkPairPathEffect : public SkPathEffect { 156 class SkPairPathEffect : public SkPathEffect {
154 public: 157 public:
155 virtual ~SkPairPathEffect(); 158 virtual ~SkPairPathEffect();
156 159
157 protected: 160 protected:
158 SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1); 161 SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1);
162 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
163 SkPairPathEffect(SkReadBuffer&);
164 #endif
159 165
160 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 166 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
161 167
162 // these are visible to our subclasses 168 // these are visible to our subclasses
163 SkPathEffect* fPE0, *fPE1; 169 SkPathEffect* fPE0, *fPE1;
164 170
165 private: 171 private:
166 typedef SkPathEffect INHERITED; 172 typedef SkPathEffect INHERITED;
167 }; 173 };
168 174
(...skipping 15 matching lines...) Expand all
184 190
185 virtual bool filterPath(SkPath* dst, const SkPath& src, 191 virtual bool filterPath(SkPath* dst, const SkPath& src,
186 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; 192 SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
187 193
188 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) 194 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect)
189 195
190 protected: 196 protected:
191 SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner) 197 SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner)
192 : INHERITED(outer, inner) {} 198 : INHERITED(outer, inner) {}
193 199
200 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
201 explicit SkComposePathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {}
202 #endif
203
194 private: 204 private:
195 // illegal 205 // illegal
196 SkComposePathEffect(const SkComposePathEffect&); 206 SkComposePathEffect(const SkComposePathEffect&);
197 SkComposePathEffect& operator=(const SkComposePathEffect&); 207 SkComposePathEffect& operator=(const SkComposePathEffect&);
198 208
199 typedef SkPairPathEffect INHERITED; 209 typedef SkPairPathEffect INHERITED;
200 }; 210 };
201 211
202 /** \class SkSumPathEffect 212 /** \class SkSumPathEffect
203 213
(...skipping 13 matching lines...) Expand all
217 227
218 virtual bool filterPath(SkPath* dst, const SkPath& src, 228 virtual bool filterPath(SkPath* dst, const SkPath& src,
219 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; 229 SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
220 230
221 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) 231 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect)
222 232
223 protected: 233 protected:
224 SkSumPathEffect(SkPathEffect* first, SkPathEffect* second) 234 SkSumPathEffect(SkPathEffect* first, SkPathEffect* second)
225 : INHERITED(first, second) {} 235 : INHERITED(first, second) {}
226 236
237 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
238 explicit SkSumPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {}
239 #endif
240
227 private: 241 private:
228 // illegal 242 // illegal
229 SkSumPathEffect(const SkSumPathEffect&); 243 SkSumPathEffect(const SkSumPathEffect&);
230 SkSumPathEffect& operator=(const SkSumPathEffect&); 244 SkSumPathEffect& operator=(const SkSumPathEffect&);
231 245
232 typedef SkPairPathEffect INHERITED; 246 typedef SkPairPathEffect INHERITED;
233 }; 247 };
234 248
235 #endif 249 #endif
OLDNEW
« no previous file with comments | « include/core/SkMaskFilter.h ('k') | include/core/SkRasterizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698