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

Side by Side Diff: gm/convexpolyclip.cpp

Issue 873753002: Spin off GM::runAsBench() from flags. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « gm/circularclips.cpp ('k') | gm/dashing.cpp » ('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 2014 Google Inc. 3 * Copyright 2014 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 #include "gm.h" 9 #include "gm.h"
10 10
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 x += textW + 2 * kMargin; 208 x += textW + 2 * kMargin;
209 } 209 }
210 y += fBmp.height() + kMargin; 210 y += fBmp.height() + kMargin;
211 } 211 }
212 y = 0; 212 y = 0;
213 startX += 2 * fBmp.width() + SkScalarCeilToInt(2 * textW) + 6 * kMar gin; 213 startX += 2 * fBmp.width() + SkScalarCeilToInt(2 * textW) + 6 * kMar gin;
214 } 214 }
215 } 215 }
216 216
217 virtual uint32_t onGetFlags() const { 217 virtual uint32_t onGetFlags() const {
218 return kAsBench_Flag | kSkipTiled_Flag; 218 return kSkipTiled_Flag;
219 } 219 }
220 220
221 bool runAsBench() const SK_OVERRIDE { return true; }
222
221 private: 223 private:
222 class Clip { 224 class Clip {
223 public: 225 public:
224 enum ClipType { 226 enum ClipType {
225 kNone_ClipType, 227 kNone_ClipType,
226 kPath_ClipType, 228 kPath_ClipType,
227 kRect_ClipType 229 kRect_ClipType
228 }; 230 };
229 231
230 Clip () : fClipType(kNone_ClipType) {} 232 Clip () : fClipType(kNone_ClipType) {}
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 296
295 SkTLList<Clip> fClips; 297 SkTLList<Clip> fClips;
296 SkBitmap fBmp; 298 SkBitmap fBmp;
297 299
298 typedef GM INHERITED; 300 typedef GM INHERITED;
299 }; 301 };
300 302
301 DEF_GM( return SkNEW(ConvexPolyClip); ) 303 DEF_GM( return SkNEW(ConvexPolyClip); )
302 304
303 } 305 }
OLDNEW
« no previous file with comments | « gm/circularclips.cpp ('k') | gm/dashing.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698