| 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 GrTInstanceBatch_DEFINED | 8 #ifndef GrTInstanceBatch_DEFINED |
| 9 #define GrTInstanceBatch_DEFINED | 9 #define GrTInstanceBatch_DEFINED |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 SkString dumpInfo() const override { | 53 SkString dumpInfo() const override { |
| 54 SkString str; | 54 SkString str; |
| 55 for (int i = 0; i < fGeoData.count(); ++i) { | 55 for (int i = 0; i < fGeoData.count(); ++i) { |
| 56 str.append(Impl::DumpInfo(fGeoData[i], i)); | 56 str.append(Impl::DumpInfo(fGeoData[i], i)); |
| 57 } | 57 } |
| 58 str.append(INHERITED::dumpInfo()); | 58 str.append(INHERITED::dumpInfo()); |
| 59 return str; | 59 return str; |
| 60 } | 60 } |
| 61 | 61 |
| 62 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { | 62 void computeBatchToXPOverrides(GrInitInvariantOutput* color, GrInitInvariant
Output* coverage, |
| 63 bool* usePLSDstRead) const { |
| 63 // When this is called on a batch, there is only one geometry bundle | 64 // When this is called on a batch, there is only one geometry bundle |
| 64 out->setKnownFourComponents(fGeoData[0].fColor); | 65 color->setKnownFourComponents(fGeoData[0].fColor); |
| 65 } | 66 Impl::InitInvariantOutputCoverage(coverage); |
| 66 | 67 *usePLSDstRead = false; |
| 67 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { | |
| 68 Impl::InitInvariantOutputCoverage(out); | |
| 69 } | 68 } |
| 70 | 69 |
| 71 void initBatchTracker(const GrPipelineOptimizations& opt) override { | 70 void initBatchTracker(const GrPipelineOptimizations& opt) override { |
| 72 opt.getOverrideColorIfSet(&fGeoData[0].fColor); | 71 opt.getOverrideColorIfSet(&fGeoData[0].fColor); |
| 73 fOpts = opt; | 72 fOpts = opt; |
| 74 } | 73 } |
| 75 | 74 |
| 76 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 75 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
| 77 | 76 |
| 78 // After seeding, the client should call init() so the Batch can initialize
itself | 77 // After seeding, the client should call init() so the Batch can initialize
itself |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return true; | 143 return true; |
| 145 } | 144 } |
| 146 | 145 |
| 147 GrPipelineOptimizations fOpts; | 146 GrPipelineOptimizations fOpts; |
| 148 SkSTArray<1, Geometry, true> fGeoData; | 147 SkSTArray<1, Geometry, true> fGeoData; |
| 149 | 148 |
| 150 typedef GrVertexBatch INHERITED; | 149 typedef GrVertexBatch INHERITED; |
| 151 }; | 150 }; |
| 152 | 151 |
| 153 #endif | 152 #endif |
| OLD | NEW |