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

Side by Side Diff: src/gpu/batches/GrAADistanceFieldPathRenderer.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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 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 "GrAADistanceFieldPathRenderer.h" 9 #include "GrAADistanceFieldPathRenderer.h"
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 return new AADistanceFieldPathBatch(geometry, viewMatrix, atlas, pathCac he, pathList); 151 return new AADistanceFieldPathBatch(geometry, viewMatrix, atlas, pathCac he, pathList);
152 } 152 }
153 153
154 const char* name() const override { return "AADistanceFieldPathBatch"; } 154 const char* name() const override { return "AADistanceFieldPathBatch"; }
155 155
156 void computePipelineOptimizations(GrInitInvariantOutput* color, 156 void computePipelineOptimizations(GrInitInvariantOutput* color,
157 GrInitInvariantOutput* coverage, 157 GrInitInvariantOutput* coverage,
158 GrBatchToXPOverrides* overrides) const ove rride { 158 GrBatchToXPOverrides* overrides) const ove rride {
159 color->setKnownFourComponents(fGeoData[0].fColor); 159 color->setKnownFourComponents(fGeoData[0].fColor);
160 coverage->setUnknownSingleComponent(); 160 coverage->setUnknownSingleComponent();
161 overrides->fUsePLSDstRead = false;
162 } 161 }
163 162
164 private: 163 private:
165 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { 164 void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
166 // Handle any color overrides 165 // Handle any color overrides
167 if (!overrides.readsColor()) { 166 if (!overrides.readsColor()) {
168 fGeoData[0].fColor = GrColor_ILLEGAL; 167 fGeoData[0].fColor = GrColor_ILLEGAL;
169 } 168 }
170 overrides.getOverrideColorIfSet(&fGeoData[0].fColor); 169 overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
171 170
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 geometry.fAntiAlias = random->nextBool(); 645 geometry.fAntiAlias = random->nextBool();
647 geometry.fGenID = random->nextU(); 646 geometry.fGenID = random->nextU();
648 647
649 return AADistanceFieldPathBatch::Create(geometry, viewMatrix, 648 return AADistanceFieldPathBatch::Create(geometry, viewMatrix,
650 gTestStruct.fAtlas, 649 gTestStruct.fAtlas,
651 &gTestStruct.fPathCache, 650 &gTestStruct.fPathCache,
652 &gTestStruct.fPathList); 651 &gTestStruct.fPathList);
653 } 652 }
654 653
655 #endif 654 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAConvexPathRenderer.cpp ('k') | src/gpu/batches/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698