| 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 26 matching lines...) Expand all Loading... |
| 37 out->setUnknownFourComponents(); | 37 out->setUnknownFourComponents(); |
| 38 } else { | 38 } else { |
| 39 out->setKnownFourComponents(fGeoData[0].fColor); | 39 out->setKnownFourComponents(fGeoData[0].fColor); |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 | 42 |
| 43 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { | 43 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { |
| 44 out->setKnownSingleComponent(0xff); | 44 out->setKnownSingleComponent(0xff); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void initBatchTracker(const GrPipelineInfo& init) override; | 47 void initBatchTracker(const GrPipelineOptimizations&) override; |
| 48 void generateGeometry(GrBatchTarget* batchTarget) override; | 48 void generateGeometry(GrBatchTarget* batchTarget) override; |
| 49 | 49 |
| 50 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 50 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, | 53 GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, |
| 54 const SkPoint* positions, int vertexCount, | 54 const SkPoint* positions, int vertexCount, |
| 55 const GrColor* colors, const SkPoint* localCoords, const Sk
Rect& bounds); | 55 const GrColor* colors, const SkPoint* localCoords, const Sk
Rect& bounds); |
| 56 | 56 |
| 57 GrColor color() const { return fColor; } | 57 GrColor color() const { return fColor; } |
| 58 bool colorIgnored() const { return fColorIgnored; } | 58 bool colorIgnored() const { return fColorIgnored; } |
| 59 const SkMatrix& viewMatrix() const { return fViewMatrix; } | 59 const SkMatrix& viewMatrix() const { return fViewMatrix; } |
| 60 bool hasColors() const { return fHasColors; } | 60 bool hasColors() const { return fHasColors; } |
| 61 int vertexCount() const { return fVertexCount; } | 61 int vertexCount() const { return fVertexCount; } |
| 62 bool coverageIgnored() const { return fCoverageIgnored; } | 62 bool coverageIgnored() const { return fCoverageIgnored; } |
| 63 | 63 |
| 64 bool onCombineIfPossible(GrBatch* t) override; | 64 bool onCombineIfPossible(GrBatch* t) override; |
| 65 SkSTArray<1, Geometry, true> fGeoData; | 65 SkSTArray<1, Geometry, true> fGeoData; |
| 66 | 66 |
| 67 SkMatrix fViewMatrix; | 67 SkMatrix fViewMatrix; |
| 68 GrColor fColor; | 68 GrColor fColor; |
| 69 int fVertexCount; | 69 int fVertexCount; |
| 70 bool fColorIgnored; | 70 bool fColorIgnored; |
| 71 bool fCoverageIgnored; | 71 bool fCoverageIgnored; |
| 72 bool fHasColors; | 72 bool fHasColors; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 #endif | 75 #endif |
| OLD | NEW |