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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 canvas->restore(); | 207 canvas->restore(); |
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 { | |
218 return kSkipTiled_Flag; | |
219 } | |
220 | |
221 bool runAsBench() const SK_OVERRIDE { return true; } | 217 bool runAsBench() const SK_OVERRIDE { return true; } |
222 | 218 |
223 private: | 219 private: |
224 class Clip { | 220 class Clip { |
225 public: | 221 public: |
226 enum ClipType { | 222 enum ClipType { |
227 kNone_ClipType, | 223 kNone_ClipType, |
228 kPath_ClipType, | 224 kPath_ClipType, |
229 kRect_ClipType | 225 kRect_ClipType |
230 }; | 226 }; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 292 |
297 SkTLList<Clip> fClips; | 293 SkTLList<Clip> fClips; |
298 SkBitmap fBmp; | 294 SkBitmap fBmp; |
299 | 295 |
300 typedef GM INHERITED; | 296 typedef GM INHERITED; |
301 }; | 297 }; |
302 | 298 |
303 DEF_GM( return SkNEW(ConvexPolyClip); ) | 299 DEF_GM( return SkNEW(ConvexPolyClip); ) |
304 | 300 |
305 } | 301 } |
OLD | NEW |