| 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 class ConvexPolyTestBatch : public GrTestBatch { | 32 class ConvexPolyTestBatch : public GrTestBatch { |
| 33 public: | 33 public: |
| 34 struct Geometry : public GrTestBatch::Geometry { | 34 struct Geometry : public GrTestBatch::Geometry { |
| 35 SkRect fBounds; | 35 SkRect fBounds; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 const char* name() const override { return "ConvexPolyTestBatch"; } | 38 const char* name() const override { return "ConvexPolyTestBatch"; } |
| 39 | 39 |
| 40 static GrDrawBatch* Create(const GrGeometryProcessor* gp, const Geometry& ge
o) { | 40 static GrDrawBatch* Create(const GrGeometryProcessor* gp, const Geometry& ge
o) { |
| 41 return SkNEW_ARGS(ConvexPolyTestBatch, (gp, geo)); | 41 return new ConvexPolyTestBatch(gp, geo); |
| 42 } | 42 } |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 ConvexPolyTestBatch(const GrGeometryProcessor* gp, const Geometry& geo) | 45 ConvexPolyTestBatch(const GrGeometryProcessor* gp, const Geometry& geo) |
| 46 : INHERITED(gp, geo.fBounds) | 46 : INHERITED(gp, geo.fBounds) |
| 47 , fGeometry(geo) { | 47 , fGeometry(geo) { |
| 48 this->initClassID<ConvexPolyTestBatch>(); | 48 this->initClassID<ConvexPolyTestBatch>(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 Geometry* geoData(int index) override { | 51 Geometry* geoData(int index) override { |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 } | 268 } |
| 269 } | 269 } |
| 270 | 270 |
| 271 private: | 271 private: |
| 272 SkTLList<SkPath> fPaths; | 272 SkTLList<SkPath> fPaths; |
| 273 SkTLList<SkRect> fRects; | 273 SkTLList<SkRect> fRects; |
| 274 | 274 |
| 275 typedef GM INHERITED; | 275 typedef GM INHERITED; |
| 276 }; | 276 }; |
| 277 | 277 |
| 278 DEF_GM( return SkNEW(ConvexPolyEffect); ) | 278 DEF_GM(return new ConvexPolyEffect;) |
| 279 } | 279 } |
| 280 | 280 |
| 281 #endif | 281 #endif |
| OLD | NEW |