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

Side by Side Diff: src/gpu/batches/GrAALinearizingConvexPathRenderer.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/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrAALinearizingConvexPathRenderer.h" 9 #include "GrAALinearizingConvexPathRenderer.h"
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 const char* name() const override { return "AAConvexBatch"; } 135 const char* name() const override { return "AAConvexBatch"; }
136 136
137 void computePipelineOptimizations(GrInitInvariantOutput* color, 137 void computePipelineOptimizations(GrInitInvariantOutput* color,
138 GrInitInvariantOutput* coverage, 138 GrInitInvariantOutput* coverage,
139 GrBatchToXPOverrides* overrides) const ove rride { 139 GrBatchToXPOverrides* overrides) const ove rride {
140 // When this is called on a batch, there is only one geometry bundle 140 // When this is called on a batch, there is only one geometry bundle
141 color->setKnownFourComponents(fGeoData[0].fColor); 141 color->setKnownFourComponents(fGeoData[0].fColor);
142 coverage->setUnknownSingleComponent(); 142 coverage->setUnknownSingleComponent();
143 overrides->fUsePLSDstRead = false;
144 } 143 }
145 144
146 private: 145 private:
147 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { 146 void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
148 // Handle any color overrides 147 // Handle any color overrides
149 if (!overrides.readsColor()) { 148 if (!overrides.readsColor()) {
150 fGeoData[0].fColor = GrColor_ILLEGAL; 149 fGeoData[0].fColor = GrColor_ILLEGAL;
151 } 150 }
152 overrides.getOverrideColorIfSet(&fGeoData[0].fColor); 151 overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
153 152
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { 348 DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) {
350 AAFlatteningConvexPathBatch::Geometry geometry; 349 AAFlatteningConvexPathBatch::Geometry geometry;
351 geometry.fColor = GrRandomColor(random); 350 geometry.fColor = GrRandomColor(random);
352 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 351 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
353 geometry.fPath = GrTest::TestPathConvex(random); 352 geometry.fPath = GrTest::TestPathConvex(random);
354 353
355 return AAFlatteningConvexPathBatch::Create(geometry); 354 return AAFlatteningConvexPathBatch::Create(geometry);
356 } 355 }
357 356
358 #endif 357 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698