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

Side by Side Diff: src/gpu/batches/GrAAConvexPathRenderer.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/GrXferProcessor.cpp ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.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 2012 Google Inc. 3 * Copyright 2012 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 "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 10
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 static GrDrawBatch* Create(const Geometry& geometry) { return new AAConvexPa thBatch(geometry); } 754 static GrDrawBatch* Create(const Geometry& geometry) { return new AAConvexPa thBatch(geometry); }
755 755
756 const char* name() const override { return "AAConvexBatch"; } 756 const char* name() const override { return "AAConvexBatch"; }
757 757
758 void computePipelineOptimizations(GrInitInvariantOutput* color, 758 void computePipelineOptimizations(GrInitInvariantOutput* color,
759 GrInitInvariantOutput* coverage, 759 GrInitInvariantOutput* coverage,
760 GrBatchToXPOverrides* overrides) const ove rride { 760 GrBatchToXPOverrides* overrides) const ove rride {
761 // When this is called on a batch, there is only one geometry bundle 761 // When this is called on a batch, there is only one geometry bundle
762 color->setKnownFourComponents(fGeoData[0].fColor); 762 color->setKnownFourComponents(fGeoData[0].fColor);
763 coverage->setUnknownSingleComponent(); 763 coverage->setUnknownSingleComponent();
764 overrides->fUsePLSDstRead = false;
765 } 764 }
766 765
767 private: 766 private:
768 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { 767 void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
769 // Handle any color overrides 768 // Handle any color overrides
770 if (!overrides.readsColor()) { 769 if (!overrides.readsColor()) {
771 fGeoData[0].fColor = GrColor_ILLEGAL; 770 fGeoData[0].fColor = GrColor_ILLEGAL;
772 } 771 }
773 overrides.getOverrideColorIfSet(&fGeoData[0].fColor); 772 overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
774 773
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { 1025 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) {
1027 AAConvexPathBatch::Geometry geometry; 1026 AAConvexPathBatch::Geometry geometry;
1028 geometry.fColor = GrRandomColor(random); 1027 geometry.fColor = GrRandomColor(random);
1029 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 1028 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
1030 geometry.fPath = GrTest::TestPathConvex(random); 1029 geometry.fPath = GrTest::TestPathConvex(random);
1031 1030
1032 return AAConvexPathBatch::Create(geometry); 1031 return AAConvexPathBatch::Create(geometry);
1033 } 1032 }
1034 1033
1035 #endif 1034 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrXferProcessor.cpp ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698