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 // This test only works with the GPU backend. | 9 // This test only works with the GPU backend. |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 protected: | 36 protected: |
37 SkString onShortName() SK_OVERRIDE { | 37 SkString onShortName() SK_OVERRIDE { |
38 return SkString("convex_poly_effect"); | 38 return SkString("convex_poly_effect"); |
39 } | 39 } |
40 | 40 |
41 SkISize onISize() SK_OVERRIDE { | 41 SkISize onISize() SK_OVERRIDE { |
42 return SkISize::Make(720, 800); | 42 return SkISize::Make(720, 800); |
43 } | 43 } |
44 | 44 |
45 uint32_t onGetFlags() const SK_OVERRIDE { | |
46 // This is a GPU-specific GM. | |
47 return kGPUOnly_Flag; | |
48 } | |
49 | |
50 void onOnceBeforeDraw() SK_OVERRIDE { | 45 void onOnceBeforeDraw() SK_OVERRIDE { |
51 SkPath tri; | 46 SkPath tri; |
52 tri.moveTo(5.f, 5.f); | 47 tri.moveTo(5.f, 5.f); |
53 tri.lineTo(100.f, 20.f); | 48 tri.lineTo(100.f, 20.f); |
54 tri.lineTo(15.f, 100.f); | 49 tri.lineTo(15.f, 100.f); |
55 | 50 |
56 fPaths.addToTail(tri); | 51 fPaths.addToTail(tri); |
57 fPaths.addToTail(SkPath())->reverseAddPath(tri); | 52 fPaths.addToTail(SkPath())->reverseAddPath(tri); |
58 | 53 |
59 tri.close(); | 54 tri.close(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 SkTLList<SkPath> fPaths; | 225 SkTLList<SkPath> fPaths; |
231 SkTLList<SkRect> fRects; | 226 SkTLList<SkRect> fRects; |
232 | 227 |
233 typedef GM INHERITED; | 228 typedef GM INHERITED; |
234 }; | 229 }; |
235 | 230 |
236 DEF_GM( return SkNEW(ConvexPolyEffect); ) | 231 DEF_GM( return SkNEW(ConvexPolyEffect); ) |
237 } | 232 } |
238 | 233 |
239 #endif | 234 #endif |
OLD | NEW |