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 25 matching lines...) Expand all Loading... |
36 const char* name() const override { return "ConvexPolyTestBatch"; } | 36 const char* name() const override { return "ConvexPolyTestBatch"; } |
37 | 37 |
38 static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo) { | 38 static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo) { |
39 return SkNEW_ARGS(ConvexPolyTestBatch, (gp, geo)); | 39 return SkNEW_ARGS(ConvexPolyTestBatch, (gp, geo)); |
40 } | 40 } |
41 | 41 |
42 private: | 42 private: |
43 ConvexPolyTestBatch(const GrGeometryProcessor* gp, const Geometry& geo) | 43 ConvexPolyTestBatch(const GrGeometryProcessor* gp, const Geometry& geo) |
44 : INHERITED(gp, geo.fBounds) | 44 : INHERITED(gp, geo.fBounds) |
45 , fGeometry(geo) { | 45 , fGeometry(geo) { |
| 46 this->initClassID<ConvexPolyTestBatch>(); |
46 } | 47 } |
47 | 48 |
48 Geometry* geoData(int index) override { | 49 Geometry* geoData(int index) override { |
49 SkASSERT(0 == index); | 50 SkASSERT(0 == index); |
50 return &fGeometry; | 51 return &fGeometry; |
51 } | 52 } |
52 | 53 |
53 const Geometry* geoData(int index) const override { | 54 const Geometry* geoData(int index) const override { |
54 SkASSERT(0 == index); | 55 SkASSERT(0 == index); |
55 return &fGeometry; | 56 return &fGeometry; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 SkTLList<SkPath> fPaths; | 268 SkTLList<SkPath> fPaths; |
268 SkTLList<SkRect> fRects; | 269 SkTLList<SkRect> fRects; |
269 | 270 |
270 typedef GM INHERITED; | 271 typedef GM INHERITED; |
271 }; | 272 }; |
272 | 273 |
273 DEF_GM( return SkNEW(ConvexPolyEffect); ) | 274 DEF_GM( return SkNEW(ConvexPolyEffect); ) |
274 } | 275 } |
275 | 276 |
276 #endif | 277 #endif |
OLD | NEW |