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

Side by Side Diff: src/gpu/GrRectBatch.cpp

Issue 1127273007: Iterate over instanced draws in GrGpu rather than above GrBatchTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove dead code Created 5 years, 7 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 | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrTest.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 * 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 #include "GrRectBatch.h" 8 #include "GrRectBatch.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 150
151 static const int kColorOffset = sizeof(SkPoint); 151 static const int kColorOffset = sizeof(SkPoint);
152 GrColor* vertColor = GrTCast<GrColor*>(offset + kColorOffset); 152 GrColor* vertColor = GrTCast<GrColor*>(offset + kColorOffset);
153 for (int j = 0; j < 4; ++j) { 153 for (int j = 0; j < 4; ++j) {
154 *vertColor = geom.fColor; 154 *vertColor = geom.fColor;
155 vertColor = (GrColor*) ((intptr_t) vertColor + vertexStride); 155 vertColor = (GrColor*) ((intptr_t) vertColor + vertexStride);
156 } 156 }
157 } 157 }
158 158
159 helper.issueDraws(batchTarget); 159 helper.issueDraw(batchTarget);
160 } 160 }
161 161
162 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 162 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
163 163
164 private: 164 private:
165 RectBatch(const Geometry& geometry) { 165 RectBatch(const Geometry& geometry) {
166 this->initClassID<RectBatch>(); 166 this->initClassID<RectBatch>();
167 fGeoData.push_back(geometry); 167 fGeoData.push_back(geometry);
168 168
169 fBounds = geometry.fRect; 169 fBounds = geometry.fRect;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 geometry.fHasLocalMatrix = true; 242 geometry.fHasLocalMatrix = true;
243 geometry.fLocalMatrix = *localMatrix; 243 geometry.fLocalMatrix = *localMatrix;
244 } else { 244 } else {
245 geometry.fHasLocalMatrix = false; 245 geometry.fHasLocalMatrix = false;
246 } 246 }
247 247
248 return RectBatch::Create(geometry); 248 return RectBatch::Create(geometry);
249 } 249 }
250 250
251 }; 251 };
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698