| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrDefaultPathRenderer.h" | 8 #include "GrDefaultPathRenderer.h" |
| 9 | 9 |
| 10 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } | 227 } |
| 228 | 228 |
| 229 const char* name() const override { return "DefaultPathBatch"; } | 229 const char* name() const override { return "DefaultPathBatch"; } |
| 230 | 230 |
| 231 void computePipelineOptimizations(GrInitInvariantOutput* color, | 231 void computePipelineOptimizations(GrInitInvariantOutput* color, |
| 232 GrInitInvariantOutput* coverage, | 232 GrInitInvariantOutput* coverage, |
| 233 GrBatchToXPOverrides* overrides) const ove
rride { | 233 GrBatchToXPOverrides* overrides) const ove
rride { |
| 234 // When this is called on a batch, there is only one geometry bundle | 234 // When this is called on a batch, there is only one geometry bundle |
| 235 color->setKnownFourComponents(fGeoData[0].fColor); | 235 color->setKnownFourComponents(fGeoData[0].fColor); |
| 236 coverage->setKnownSingleComponent(this->coverage()); | 236 coverage->setKnownSingleComponent(this->coverage()); |
| 237 overrides->fUsePLSDstRead = false; | |
| 238 } | 237 } |
| 239 | 238 |
| 240 private: | 239 private: |
| 241 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { | 240 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { |
| 242 // Handle any color overrides | 241 // Handle any color overrides |
| 243 if (!overrides.readsColor()) { | 242 if (!overrides.readsColor()) { |
| 244 fGeoData[0].fColor = GrColor_ILLEGAL; | 243 fGeoData[0].fColor = GrColor_ILLEGAL; |
| 245 } | 244 } |
| 246 overrides.getOverrideColorIfSet(&fGeoData[0].fColor); | 245 overrides.getOverrideColorIfSet(&fGeoData[0].fColor); |
| 247 | 246 |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 geometry.fColor = color; | 769 geometry.fColor = color; |
| 771 geometry.fPath = path; | 770 geometry.fPath = path; |
| 772 geometry.fTolerance = srcSpaceTol; | 771 geometry.fTolerance = srcSpaceTol; |
| 773 | 772 |
| 774 viewMatrix.mapRect(&bounds); | 773 viewMatrix.mapRect(&bounds); |
| 775 uint8_t coverage = GrRandomCoverage(random); | 774 uint8_t coverage = GrRandomCoverage(random); |
| 776 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds
); | 775 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds
); |
| 777 } | 776 } |
| 778 | 777 |
| 779 #endif | 778 #endif |
| OLD | NEW |