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

Side by Side Diff: gm/convexpolyeffect.cpp

Issue 1237283007: Give GrBatch a pointer to GrPipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 5 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/GrBatch.h » ('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 25 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « gm/beziereffects.cpp ('k') | src/gpu/GrBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698