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