Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: gm/convexpolyeffect.cpp

Issue 1275083002: Don't pass pipeline to GrBatch::generateGeometry() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/beziereffects.cpp ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « gm/beziereffects.cpp ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698