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>(); | |
47 } | 46 } |
48 | 47 |
49 Geometry* geoData(int index) override { | 48 Geometry* geoData(int index) override { |
50 SkASSERT(0 == index); | 49 SkASSERT(0 == index); |
51 return &fGeometry; | 50 return &fGeometry; |
52 } | 51 } |
53 | 52 |
54 const Geometry* geoData(int index) const override { | 53 const Geometry* geoData(int index) const override { |
55 SkASSERT(0 == index); | 54 SkASSERT(0 == index); |
56 return &fGeometry; | 55 return &fGeometry; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 SkTLList<SkPath> fPaths; | 267 SkTLList<SkPath> fPaths; |
269 SkTLList<SkRect> fRects; | 268 SkTLList<SkRect> fRects; |
270 | 269 |
271 typedef GM INHERITED; | 270 typedef GM INHERITED; |
272 }; | 271 }; |
273 | 272 |
274 DEF_GM( return SkNEW(ConvexPolyEffect); ) | 273 DEF_GM( return SkNEW(ConvexPolyEffect); ) |
275 } | 274 } |
276 | 275 |
277 #endif | 276 #endif |
OLD | NEW |