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

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

Issue 1274513005: Rename GrPipelineInfo to GrPipelineOptimizations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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 | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrGeometryProcessor.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "GrDefaultPathRenderer.h" 8 #include "GrDefaultPathRenderer.h"
9 9
10 #include "GrBatchTarget.h" 10 #include "GrBatchTarget.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 const char* name() const override { return "DefaultPathBatch"; } 229 const char* name() const override { return "DefaultPathBatch"; }
230 230
231 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 231 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
232 // When this is called on a batch, there is only one geometry bundle 232 // When this is called on a batch, there is only one geometry bundle
233 out->setKnownFourComponents(fGeoData[0].fColor); 233 out->setKnownFourComponents(fGeoData[0].fColor);
234 } 234 }
235 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 235 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
236 out->setKnownSingleComponent(this->coverage()); 236 out->setKnownSingleComponent(this->coverage());
237 } 237 }
238 238
239 void initBatchTracker(const GrPipelineInfo& init) override { 239 void initBatchTracker(const GrPipelineOptimizations& opt) override {
240 // Handle any color overrides 240 // Handle any color overrides
241 if (!init.readsColor()) { 241 if (!opt.readsColor()) {
242 fGeoData[0].fColor = GrColor_ILLEGAL; 242 fGeoData[0].fColor = GrColor_ILLEGAL;
243 } 243 }
244 init.getOverrideColorIfSet(&fGeoData[0].fColor); 244 opt.getOverrideColorIfSet(&fGeoData[0].fColor);
245 245
246 // setup batch properties 246 // setup batch properties
247 fBatch.fColorIgnored = !init.readsColor(); 247 fBatch.fColorIgnored = !opt.readsColor();
248 fBatch.fColor = fGeoData[0].fColor; 248 fBatch.fColor = fGeoData[0].fColor;
249 fBatch.fUsesLocalCoords = init.readsLocalCoords(); 249 fBatch.fUsesLocalCoords = opt.readsLocalCoords();
250 fBatch.fCoverageIgnored = !init.readsCoverage(); 250 fBatch.fCoverageIgnored = !opt.readsCoverage();
251 } 251 }
252 252
253 void generateGeometry(GrBatchTarget* batchTarget) override { 253 void generateGeometry(GrBatchTarget* batchTarget) override {
254 SkAutoTUnref<const GrGeometryProcessor> gp; 254 SkAutoTUnref<const GrGeometryProcessor> gp;
255 { 255 {
256 using namespace GrDefaultGeoProcFactory; 256 using namespace GrDefaultGeoProcFactory;
257 Color color(this->color()); 257 Color color(this->color());
258 Coverage coverage(this->coverage()); 258 Coverage coverage(this->coverage());
259 if (this->coverageIgnored()) { 259 if (this->coverageIgnored()) {
260 coverage.fType = Coverage::kNone_Type; 260 coverage.fType = Coverage::kNone_Type;
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 geometry.fColor = color; 754 geometry.fColor = color;
755 geometry.fPath = path; 755 geometry.fPath = path;
756 geometry.fTolerance = srcSpaceTol; 756 geometry.fTolerance = srcSpaceTol;
757 757
758 viewMatrix.mapRect(&bounds); 758 viewMatrix.mapRect(&bounds);
759 uint8_t coverage = GrRandomCoverage(random); 759 uint8_t coverage = GrRandomCoverage(random);
760 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds ); 760 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds );
761 } 761 }
762 762
763 #endif 763 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698