| OLD | NEW |
| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 static GrDrawBatch* Create(const Geometry& geometry, GrColor color, const Sk
Matrix& viewMatrix, | 128 static GrDrawBatch* Create(const Geometry& geometry, GrColor color, const Sk
Matrix& viewMatrix, |
| 129 GrBatchAtlas* atlas, PathCache* pathCache, PathDa
taList* pathList) { | 129 GrBatchAtlas* atlas, PathCache* pathCache, PathDa
taList* pathList) { |
| 130 return new AADistanceFieldPathBatch(geometry, color, viewMatrix, atlas,
pathCache, | 130 return new AADistanceFieldPathBatch(geometry, color, viewMatrix, atlas,
pathCache, |
| 131 pathList); | 131 pathList); |
| 132 } | 132 } |
| 133 | 133 |
| 134 const char* name() const override { return "AADistanceFieldPathBatch"; } | 134 const char* name() const override { return "AADistanceFieldPathBatch"; } |
| 135 | 135 |
| 136 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { | 136 void computeBatchToXPOverrides(GrInitInvariantOutput* color, GrInitInvariant
Output* coverage, |
| 137 out->setKnownFourComponents(fBatch.fColor); | 137 bool* usePLSDstRead) const { |
| 138 } | 138 color->setKnownFourComponents(fBatch.fColor); |
| 139 | 139 coverage->setUnknownSingleComponent(); |
| 140 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { | 140 *usePLSDstRead = false; |
| 141 out->setUnknownSingleComponent(); | |
| 142 } | 141 } |
| 143 | 142 |
| 144 private: | 143 private: |
| 145 void initBatchTracker(const GrPipelineOptimizations& opt) override { | 144 void initBatchTracker(const GrPipelineOptimizations& opt) override { |
| 146 // Handle any color overrides | 145 // Handle any color overrides |
| 147 if (!opt.readsColor()) { | 146 if (!opt.readsColor()) { |
| 148 fBatch.fColor = GrColor_ILLEGAL; | 147 fBatch.fColor = GrColor_ILLEGAL; |
| 149 } | 148 } |
| 150 opt.getOverrideColorIfSet(&fBatch.fColor); | 149 opt.getOverrideColorIfSet(&fBatch.fColor); |
| 151 | 150 |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 geometry.fPath = GrTest::TestPath(random); | 620 geometry.fPath = GrTest::TestPath(random); |
| 622 geometry.fAntiAlias = random->nextBool(); | 621 geometry.fAntiAlias = random->nextBool(); |
| 623 | 622 |
| 624 return AADistanceFieldPathBatch::Create(geometry, color, viewMatrix, | 623 return AADistanceFieldPathBatch::Create(geometry, color, viewMatrix, |
| 625 gTestStruct.fAtlas, | 624 gTestStruct.fAtlas, |
| 626 &gTestStruct.fPathCache, | 625 &gTestStruct.fPathCache, |
| 627 &gTestStruct.fPathList); | 626 &gTestStruct.fPathList); |
| 628 } | 627 } |
| 629 | 628 |
| 630 #endif | 629 #endif |
| OLD | NEW |