| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 virtual SkString onShortName() SK_OVERRIDE { | 81 virtual SkString onShortName() SK_OVERRIDE { |
| 82 return SkString("convex_poly_clip"); | 82 return SkString("convex_poly_clip"); |
| 83 } | 83 } |
| 84 | 84 |
| 85 virtual SkISize onISize() SK_OVERRIDE { | 85 virtual SkISize onISize() SK_OVERRIDE { |
| 86 // When benchmarking the saveLayer set of draws is skipped. | 86 // When benchmarking the saveLayer set of draws is skipped. |
| 87 int w = 435; | 87 int w = 435; |
| 88 if (kBench_Mode != this->getMode()) { | 88 if (kBench_Mode != this->getMode()) { |
| 89 w *= 2; | 89 w *= 2; |
| 90 } | 90 } |
| 91 return make_isize(w, 540); | 91 return SkISize::Make(w, 540); |
| 92 } | 92 } |
| 93 | 93 |
| 94 virtual void onOnceBeforeDraw() SK_OVERRIDE { | 94 virtual void onOnceBeforeDraw() SK_OVERRIDE { |
| 95 SkPath tri; | 95 SkPath tri; |
| 96 tri.moveTo(5.f, 5.f); | 96 tri.moveTo(5.f, 5.f); |
| 97 tri.lineTo(100.f, 20.f); | 97 tri.lineTo(100.f, 20.f); |
| 98 tri.lineTo(15.f, 100.f); | 98 tri.lineTo(15.f, 100.f); |
| 99 | 99 |
| 100 fClips.addToTail()->setPath(tri); | 100 fClips.addToTail()->setPath(tri); |
| 101 | 101 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 292 |
| 293 SkTLList<Clip> fClips; | 293 SkTLList<Clip> fClips; |
| 294 SkBitmap fBmp; | 294 SkBitmap fBmp; |
| 295 | 295 |
| 296 typedef GM INHERITED; | 296 typedef GM INHERITED; |
| 297 }; | 297 }; |
| 298 | 298 |
| 299 DEF_GM( return SkNEW(ConvexPolyClip); ) | 299 DEF_GM( return SkNEW(ConvexPolyClip); ) |
| 300 | 300 |
| 301 } | 301 } |
| OLD | NEW |