| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 Geometry* geoData(int index) override { | 49 Geometry* geoData(int index) override { |
| 50 SkASSERT(0 == index); | 50 SkASSERT(0 == index); |
| 51 return &fGeometry; | 51 return &fGeometry; |
| 52 } | 52 } |
| 53 | 53 |
| 54 const Geometry* geoData(int index) const override { | 54 const Geometry* geoData(int index) const override { |
| 55 SkASSERT(0 == index); | 55 SkASSERT(0 == index); |
| 56 return &fGeometry; | 56 return &fGeometry; |
| 57 } | 57 } |
| 58 | 58 |
| 59 void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeli
ne) override { | 59 void onGenerateGeometry(GrBatchTarget* batchTarget) override { |
| 60 size_t vertexStride = this->geometryProcessor()->getVertexStride(); | 60 size_t vertexStride = this->geometryProcessor()->getVertexStride(); |
| 61 SkASSERT(vertexStride == sizeof(SkPoint)); | 61 SkASSERT(vertexStride == sizeof(SkPoint)); |
| 62 QuadHelper helper; | 62 QuadHelper helper; |
| 63 SkPoint* verts = reinterpret_cast<SkPoint*>(helper.init(batchTarget, ver
texStride, 1)); | 63 SkPoint* verts = reinterpret_cast<SkPoint*>(helper.init(batchTarget, ver
texStride, 1)); |
| 64 if (!verts) { | 64 if (!verts) { |
| 65 return; | 65 return; |
| 66 } | 66 } |
| 67 | 67 |
| 68 // Make sure any artifacts around the exterior of path are visible by us
ing overly | 68 // Make sure any artifacts around the exterior of path are visible by us
ing overly |
| 69 // conservative bounding geometry. | 69 // conservative bounding geometry. |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 SkTLList<SkPath> fPaths; | 270 SkTLList<SkPath> fPaths; |
| 271 SkTLList<SkRect> fRects; | 271 SkTLList<SkRect> fRects; |
| 272 | 272 |
| 273 typedef GM INHERITED; | 273 typedef GM INHERITED; |
| 274 }; | 274 }; |
| 275 | 275 |
| 276 DEF_GM( return SkNEW(ConvexPolyEffect); ) | 276 DEF_GM( return SkNEW(ConvexPolyEffect); ) |
| 277 } | 277 } |
| 278 | 278 |
| 279 #endif | 279 #endif |
| OLD | NEW |