OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |