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

Side by Side Diff: src/gpu/GrAARectRenderer.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/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/GrAtlasTextContext.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 2012 Google Inc. 2 * Copyright 2012 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 "GrAARectRenderer.h" 8 #include "GrAARectRenderer.h"
9 #include "GrBatch.h" 9 #include "GrBatch.h"
10 #include "GrBatchTarget.h" 10 #include "GrBatchTarget.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 this->generateAAFillRectGeometry(vertices, 133 this->generateAAFillRectGeometry(vertices,
134 i * kVertsPerAAFillRect * vertexStr ide, 134 i * kVertsPerAAFillRect * vertexStr ide,
135 vertexStride, 135 vertexStride,
136 args.fColor, 136 args.fColor,
137 args.fViewMatrix, 137 args.fViewMatrix,
138 args.fRect, 138 args.fRect,
139 args.fDevRect, 139 args.fDevRect,
140 canTweakAlphaForCoverage); 140 canTweakAlphaForCoverage);
141 } 141 }
142 142
143 helper.issueDraws(batchTarget); 143 helper.issueDraw(batchTarget);
144 } 144 }
145 145
146 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 146 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
147 147
148 private: 148 private:
149 AAFillRectBatch(const Geometry& geometry) { 149 AAFillRectBatch(const Geometry& geometry) {
150 this->initClassID<AAFillRectBatch>(); 150 this->initClassID<AAFillRectBatch>();
151 fGeoData.push_back(geometry); 151 fGeoData.push_back(geometry);
152 152
153 this->setBounds(geometry.fDevRect); 153 this->setBounds(geometry.fDevRect);
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 vertexStride, 498 vertexStride,
499 outerVertexNum, 499 outerVertexNum,
500 innerVertexNum, 500 innerVertexNum,
501 args.fColor, 501 args.fColor,
502 args.fDevOutside, 502 args.fDevOutside,
503 args.fDevOutsideAssist, 503 args.fDevOutsideAssist,
504 args.fDevInside, 504 args.fDevInside,
505 args.fMiterStroke, 505 args.fMiterStroke,
506 canTweakAlphaForCoverage); 506 canTweakAlphaForCoverage);
507 } 507 }
508 helper.issueDraws(batchTarget); 508 helper.issueDraw(batchTarget);
509 } 509 }
510 510
511 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 511 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
512 512
513 private: 513 private:
514 AAStrokeRectBatch(const Geometry& geometry, const SkMatrix& viewMatrix) { 514 AAStrokeRectBatch(const Geometry& geometry, const SkMatrix& viewMatrix) {
515 this->initClassID<AAStrokeRectBatch>(); 515 this->initClassID<AAStrokeRectBatch>();
516 fBatch.fViewMatrix = viewMatrix; 516 fBatch.fViewMatrix = viewMatrix;
517 fGeoData.push_back(geometry); 517 fGeoData.push_back(geometry);
518 518
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 geo.fColor = GrRandomColor(random); 855 geo.fColor = GrRandomColor(random);
856 geo.fDevOutside = outside; 856 geo.fDevOutside = outside;
857 geo.fDevOutsideAssist = outsideAssist; 857 geo.fDevOutsideAssist = outsideAssist;
858 geo.fDevInside = inside; 858 geo.fDevInside = inside;
859 geo.fMiterStroke = miterStroke; 859 geo.fMiterStroke = miterStroke;
860 860
861 return AAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random)); 861 return AAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random));
862 } 862 }
863 863
864 #endif 864 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698