| 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 |
| 11 #include "gm.h" | 11 #include "gm.h" |
| 12 | 12 |
| 13 #if SK_SUPPORT_GPU | 13 #if SK_SUPPORT_GPU |
| 14 | 14 |
| 15 #include "GrContext.h" | 15 #include "GrContext.h" |
| 16 #include "GrPathUtils.h" | 16 #include "GrPathUtils.h" |
| 17 #include "GrTest.h" | 17 #include "GrTest.h" |
| 18 #include "SkColorPriv.h" | 18 #include "SkColorPriv.h" |
| 19 #include "SkDevice.h" | 19 #include "SkDevice.h" |
| 20 #include "SkGeometry.h" | 20 #include "SkGeometry.h" |
| 21 #include "SkTLList.h" | 21 #include "SkTLList.h" |
| 22 | 22 |
| 23 #include "effects/GrConvexPolyEffect.h" | 23 #include "effects/GrConvexPolyEffect.h" |
| 24 | 24 |
| 25 namespace { | |
| 26 extern const GrVertexAttrib kAttribs[] = { | |
| 27 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBinding}, | |
| 28 }; | |
| 29 } | |
| 30 | |
| 31 namespace skiagm { | 25 namespace skiagm { |
| 32 /** | 26 /** |
| 33 * This GM directly exercises a GrEffect that draws convex polygons. | 27 * This GM directly exercises a GrEffect that draws convex polygons. |
| 34 */ | 28 */ |
| 35 class ConvexPolyEffect : public GM { | 29 class ConvexPolyEffect : public GM { |
| 36 public: | 30 public: |
| 37 ConvexPolyEffect() { | 31 ConvexPolyEffect() { |
| 38 this->setBGColor(0xFFFFFFFF); | 32 this->setBGColor(0xFFFFFFFF); |
| 39 } | 33 } |
| 40 | 34 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 SkTLList<SkPath> fPaths; | 221 SkTLList<SkPath> fPaths; |
| 228 SkTLList<SkRect> fRects; | 222 SkTLList<SkRect> fRects; |
| 229 | 223 |
| 230 typedef GM INHERITED; | 224 typedef GM INHERITED; |
| 231 }; | 225 }; |
| 232 | 226 |
| 233 DEF_GM( return SkNEW(ConvexPolyEffect); ) | 227 DEF_GM( return SkNEW(ConvexPolyEffect); ) |
| 234 } | 228 } |
| 235 | 229 |
| 236 #endif | 230 #endif |
| OLD | NEW |