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

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

Issue 1541903002: added support for PLS path rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix for ASAN failure Created 4 years, 10 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/batches/GrAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.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 "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 228
229 const char* name() const override { return "DefaultPathBatch"; } 229 const char* name() const override { return "DefaultPathBatch"; }
230 230
231 void computePipelineOptimizations(GrInitInvariantOutput* color, 231 void computePipelineOptimizations(GrInitInvariantOutput* color,
232 GrInitInvariantOutput* coverage, 232 GrInitInvariantOutput* coverage,
233 GrBatchToXPOverrides* overrides) const ove rride { 233 GrBatchToXPOverrides* overrides) const ove rride {
234 // When this is called on a batch, there is only one geometry bundle 234 // When this is called on a batch, there is only one geometry bundle
235 color->setKnownFourComponents(fGeoData[0].fColor); 235 color->setKnownFourComponents(fGeoData[0].fColor);
236 coverage->setKnownSingleComponent(this->coverage()); 236 coverage->setKnownSingleComponent(this->coverage());
237 overrides->fUsePLSDstRead = false;
238 } 237 }
239 238
240 private: 239 private:
241 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { 240 void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
242 // Handle any color overrides 241 // Handle any color overrides
243 if (!overrides.readsColor()) { 242 if (!overrides.readsColor()) {
244 fGeoData[0].fColor = GrColor_ILLEGAL; 243 fGeoData[0].fColor = GrColor_ILLEGAL;
245 } 244 }
246 overrides.getOverrideColorIfSet(&fGeoData[0].fColor); 245 overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
247 246
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 geometry.fColor = color; 769 geometry.fColor = color;
771 geometry.fPath = path; 770 geometry.fPath = path;
772 geometry.fTolerance = srcSpaceTol; 771 geometry.fTolerance = srcSpaceTol;
773 772
774 viewMatrix.mapRect(&bounds); 773 viewMatrix.mapRect(&bounds);
775 uint8_t coverage = GrRandomCoverage(random); 774 uint8_t coverage = GrRandomCoverage(random);
776 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds ); 775 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds );
777 } 776 }
778 777
779 #endif 778 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698