| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef GrTestBatch_DEFINED | 8 #ifndef GrTestBatch_DEFINED |
| 9 #define GrTestBatch_DEFINED | 9 #define GrTestBatch_DEFINED |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 virtual const char* name() const override = 0; | 27 virtual const char* name() const override = 0; |
| 28 | 28 |
| 29 void computePipelineOptimizations(GrInitInvariantOutput* color, | 29 void computePipelineOptimizations(GrInitInvariantOutput* color, |
| 30 GrInitInvariantOutput* coverage, | 30 GrInitInvariantOutput* coverage, |
| 31 GrBatchToXPOverrides* overrides) const ove
rride { | 31 GrBatchToXPOverrides* overrides) const ove
rride { |
| 32 // When this is called on a batch, there is only one geometry bundle | 32 // When this is called on a batch, there is only one geometry bundle |
| 33 color->setKnownFourComponents(this->geoData(0)->fColor); | 33 color->setKnownFourComponents(this->geoData(0)->fColor); |
| 34 coverage->setUnknownSingleComponent(); | 34 coverage->setUnknownSingleComponent(); |
| 35 overrides->fUsePLSDstRead = false; | |
| 36 } | 35 } |
| 37 | 36 |
| 38 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { | 37 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { |
| 39 // Handle any color overrides | 38 // Handle any color overrides |
| 40 if (!overrides.readsColor()) { | 39 if (!overrides.readsColor()) { |
| 41 this->geoData(0)->fColor = GrColor_ILLEGAL; | 40 this->geoData(0)->fColor = GrColor_ILLEGAL; |
| 42 } | 41 } |
| 43 overrides.getOverrideColorIfSet(&this->geoData(0)->fColor); | 42 overrides.getOverrideColorIfSet(&this->geoData(0)->fColor); |
| 44 | 43 |
| 45 // setup batch properties | 44 // setup batch properties |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 bool fCoverageIgnored; | 80 bool fCoverageIgnored; |
| 82 }; | 81 }; |
| 83 | 82 |
| 84 SkAutoTUnref<const GrGeometryProcessor> fGeometryProcessor; | 83 SkAutoTUnref<const GrGeometryProcessor> fGeometryProcessor; |
| 85 BatchTracker fBatch; | 84 BatchTracker fBatch; |
| 86 | 85 |
| 87 typedef GrVertexBatch INHERITED; | 86 typedef GrVertexBatch INHERITED; |
| 88 }; | 87 }; |
| 89 | 88 |
| 90 #endif | 89 #endif |
| OLD | NEW |