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 GrRectBatch_DEFINED | 8 #ifndef GrRectBatch_DEFINED |
9 #define GrRectBatch_DEFINED | 9 #define GrRectBatch_DEFINED |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { | 36 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { |
37 // When this is called on a batch, there is only one geometry bundle | 37 // When this is called on a batch, there is only one geometry bundle |
38 out->setKnownFourComponents(fGeoData[0].fColor); | 38 out->setKnownFourComponents(fGeoData[0].fColor); |
39 } | 39 } |
40 | 40 |
41 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { | 41 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { |
42 out->setKnownSingleComponent(0xff); | 42 out->setKnownSingleComponent(0xff); |
43 } | 43 } |
44 | 44 |
45 void initBatchTracker(const GrPipelineInfo& init) override; | 45 void initBatchTracker(const GrPipelineOptimizations&) override; |
46 | 46 |
47 void generateGeometry(GrBatchTarget* batchTarget) override; | 47 void generateGeometry(GrBatchTarget* batchTarget) override; |
48 | 48 |
49 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 49 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
50 | 50 |
51 private: | 51 private: |
52 GrRectBatch(const Geometry& geometry) { | 52 GrRectBatch(const Geometry& geometry) { |
53 this->initClassID<GrRectBatch>(); | 53 this->initClassID<GrRectBatch>(); |
54 fGeoData.push_back(geometry); | 54 fGeoData.push_back(geometry); |
55 | 55 |
(...skipping 19 matching lines...) Expand all Loading... |
75 bool fUsesLocalCoords; | 75 bool fUsesLocalCoords; |
76 bool fColorIgnored; | 76 bool fColorIgnored; |
77 bool fCoverageIgnored; | 77 bool fCoverageIgnored; |
78 }; | 78 }; |
79 | 79 |
80 BatchTracker fBatch; | 80 BatchTracker fBatch; |
81 SkSTArray<1, Geometry, true> fGeoData; | 81 SkSTArray<1, Geometry, true> fGeoData; |
82 }; | 82 }; |
83 | 83 |
84 #endif | 84 #endif |
OLD | NEW |