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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |