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 GrDrawAtlasBatch_DEFINED | 8 #ifndef GrDrawAtlasBatch_DEFINED |
9 #define GrDrawAtlasBatch_DEFINED | 9 #define GrDrawAtlasBatch_DEFINED |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 void computePipelineOptimizations(GrInitInvariantOutput* color, | 32 void computePipelineOptimizations(GrInitInvariantOutput* color, |
33 GrInitInvariantOutput* coverage, | 33 GrInitInvariantOutput* coverage, |
34 GrBatchToXPOverrides* overrides) const ove
rride { | 34 GrBatchToXPOverrides* overrides) const ove
rride { |
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 if (this->hasColors()) { | 36 if (this->hasColors()) { |
37 color->setUnknownFourComponents(); | 37 color->setUnknownFourComponents(); |
38 } else { | 38 } else { |
39 color->setKnownFourComponents(fGeoData[0].fColor); | 39 color->setKnownFourComponents(fGeoData[0].fColor); |
40 } | 40 } |
41 coverage->setKnownSingleComponent(0xff); | 41 coverage->setKnownSingleComponent(0xff); |
42 overrides->fUsePLSDstRead = false; | |
43 } | 42 } |
44 | 43 |
45 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 44 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
46 | 45 |
47 private: | 46 private: |
48 void onPrepareDraws(Target*) const override; | 47 void onPrepareDraws(Target*) const override; |
49 | 48 |
50 void initBatchTracker(const GrXPOverridesForBatch&) override; | 49 void initBatchTracker(const GrXPOverridesForBatch&) override; |
51 | 50 |
52 GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, int s
priteCount, | 51 GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, int s
priteCount, |
(...skipping 13 matching lines...) Expand all Loading... |
66 GrColor fColor; | 65 GrColor fColor; |
67 int fQuadCount; | 66 int fQuadCount; |
68 bool fColorIgnored; | 67 bool fColorIgnored; |
69 bool fCoverageIgnored; | 68 bool fCoverageIgnored; |
70 bool fHasColors; | 69 bool fHasColors; |
71 | 70 |
72 typedef GrVertexBatch INHERITED; | 71 typedef GrVertexBatch INHERITED; |
73 }; | 72 }; |
74 | 73 |
75 #endif | 74 #endif |
OLD | NEW |