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 13 matching lines...) Expand all Loading... |
24 | 24 |
25 #include "batches/GrTestBatch.h" | 25 #include "batches/GrTestBatch.h" |
26 #include "batches/GrVertexBatch.h" | 26 #include "batches/GrVertexBatch.h" |
27 | 27 |
28 #include "effects/GrConvexPolyEffect.h" | 28 #include "effects/GrConvexPolyEffect.h" |
29 | 29 |
30 namespace skiagm { | 30 namespace skiagm { |
31 | 31 |
32 class ConvexPolyTestBatch : public GrTestBatch { | 32 class ConvexPolyTestBatch : public GrTestBatch { |
33 public: | 33 public: |
| 34 BATCH_CLASS_ID |
34 struct Geometry : public GrTestBatch::Geometry { | 35 struct Geometry : public GrTestBatch::Geometry { |
35 SkRect fBounds; | 36 SkRect fBounds; |
36 }; | 37 }; |
37 | 38 |
38 const char* name() const override { return "ConvexPolyTestBatch"; } | 39 const char* name() const override { return "ConvexPolyTestBatch"; } |
39 | 40 |
40 static GrDrawBatch* Create(const GrGeometryProcessor* gp, const Geometry& ge
o) { | 41 static GrDrawBatch* Create(const GrGeometryProcessor* gp, const Geometry& ge
o) { |
41 return new ConvexPolyTestBatch(gp, geo); | 42 return new ConvexPolyTestBatch(gp, geo); |
42 } | 43 } |
43 | 44 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 SkTLList<SkPath> fPaths; | 273 SkTLList<SkPath> fPaths; |
273 SkTLList<SkRect> fRects; | 274 SkTLList<SkRect> fRects; |
274 | 275 |
275 typedef GM INHERITED; | 276 typedef GM INHERITED; |
276 }; | 277 }; |
277 | 278 |
278 DEF_GM(return new ConvexPolyEffect;) | 279 DEF_GM(return new ConvexPolyEffect;) |
279 } | 280 } |
280 | 281 |
281 #endif | 282 #endif |
OLD | NEW |