OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |