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

Side by Side Diff: src/gpu/batches/GrTInstanceBatch.h

Issue 1483103003: Make onPrepareDraws const (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: merge Created 5 years 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrTInstanceBatch_DEFINED 8 #ifndef GrTInstanceBatch_DEFINED
9 #define GrTInstanceBatch_DEFINED 9 #define GrTInstanceBatch_DEFINED
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 void updateBoundsAfterAppend() { 84 void updateBoundsAfterAppend() {
85 const Geometry& geo = fGeoData.back(); 85 const Geometry& geo = fGeoData.back();
86 Impl::UpdateBoundsAfterAppend(geo, &fBounds); 86 Impl::UpdateBoundsAfterAppend(geo, &fBounds);
87 } 87 }
88 88
89 private: 89 private:
90 GrTInstanceBatch() : INHERITED(ClassID()) {} 90 GrTInstanceBatch() : INHERITED(ClassID()) {}
91 91
92 void onPrepareDraws(Target* target) override { 92 void onPrepareDraws(Target* target) const override {
93 SkAutoTUnref<const GrGeometryProcessor> gp(Impl::CreateGP(this->seedGeom etry(), 93 SkAutoTUnref<const GrGeometryProcessor> gp(Impl::CreateGP(this->seedGeom etry(),
94 fOverrides)); 94 fOverrides));
95 if (!gp) { 95 if (!gp) {
96 SkDebugf("Couldn't create GrGeometryProcessor\n"); 96 SkDebugf("Couldn't create GrGeometryProcessor\n");
97 return; 97 return;
98 } 98 }
99 99
100 target->initDraw(gp, this->pipeline()); 100 target->initDraw(gp, this->pipeline());
101 101
102 size_t vertexStride = gp->getVertexStride(); 102 size_t vertexStride = gp->getVertexStride();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return true; 145 return true;
146 } 146 }
147 147
148 GrXPOverridesForBatch fOverrides; 148 GrXPOverridesForBatch fOverrides;
149 SkSTArray<1, Geometry, true> fGeoData; 149 SkSTArray<1, Geometry, true> fGeoData;
150 150
151 typedef GrVertexBatch INHERITED; 151 typedef GrVertexBatch INHERITED;
152 }; 152 };
153 153
154 #endif 154 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrNonAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698