| 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 GrAAStrokeRectBatch_DEFINED | 8 #ifndef GrAAStrokeRectBatch_DEFINED |
| 9 #define GrAAStrokeRectBatch_DEFINED | 9 #define GrAAStrokeRectBatch_DEFINED |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { | 34 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { |
| 35 // When this is called on a batch, there is only one geometry bundle | 35 // When this is called on a batch, there is only one geometry bundle |
| 36 out->setKnownFourComponents(fGeoData[0].fColor); | 36 out->setKnownFourComponents(fGeoData[0].fColor); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { | 39 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { |
| 40 out->setUnknownSingleComponent(); | 40 out->setUnknownSingleComponent(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void initBatchTracker(const GrPipelineInfo& init) override; | 43 void initBatchTracker(const GrPipelineOptimizations&) override; |
| 44 | 44 |
| 45 void generateGeometry(GrBatchTarget* batchTarget) override; | 45 void generateGeometry(GrBatchTarget* batchTarget) override; |
| 46 | 46 |
| 47 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 47 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 GrAAStrokeRectBatch(const Geometry& geometry, const SkMatrix& viewMatrix) { | 50 GrAAStrokeRectBatch(const Geometry& geometry, const SkMatrix& viewMatrix) { |
| 51 this->initClassID<GrAAStrokeRectBatch>(); | 51 this->initClassID<GrAAStrokeRectBatch>(); |
| 52 fBatch.fViewMatrix = viewMatrix; | 52 fBatch.fViewMatrix = viewMatrix; |
| 53 fGeoData.push_back(geometry); | 53 fGeoData.push_back(geometry); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 bool fMiterStroke; | 101 bool fMiterStroke; |
| 102 bool fCanTweakAlphaForCoverage; | 102 bool fCanTweakAlphaForCoverage; |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 BatchTracker fBatch; | 105 BatchTracker fBatch; |
| 106 SkSTArray<1, Geometry, true> fGeoData; | 106 SkSTArray<1, Geometry, true> fGeoData; |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 | 109 |
| 110 #endif | 110 #endif |
| OLD | NEW |