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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 GrColor color() const { return fBatch.fColor; } | 60 GrColor color() const { return fBatch.fColor; } |
61 bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; } | 61 bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; } |
62 bool colorIgnored() const { return fBatch.fColorIgnored; } | 62 bool colorIgnored() const { return fBatch.fColorIgnored; } |
63 const SkMatrix& viewMatrix() const { return fGeoData[0].fViewMatrix; } | 63 const SkMatrix& viewMatrix() const { return fGeoData[0].fViewMatrix; } |
64 const SkMatrix& localMatrix() const { return fGeoData[0].fLocalMatrix; } | 64 const SkMatrix& localMatrix() const { return fGeoData[0].fLocalMatrix; } |
65 bool hasLocalRect() const { return fGeoData[0].fHasLocalRect; } | 65 bool hasLocalRect() const { return fGeoData[0].fHasLocalRect; } |
66 bool hasLocalMatrix() const { return fGeoData[0].fHasLocalMatrix; } | 66 bool hasLocalMatrix() const { return fGeoData[0].fHasLocalMatrix; } |
67 bool coverageIgnored() const { return fBatch.fCoverageIgnored; } | 67 bool coverageIgnored() const { return fBatch.fCoverageIgnored; } |
68 | 68 |
69 bool onCombineIfPossible(GrBatch* t) override; | 69 bool onCombineIfPossible(GrBatch* t, const GrCaps&) override; |
70 | 70 |
71 const GrGeometryProcessor* createRectGP(); | 71 const GrGeometryProcessor* createRectGP(); |
72 | 72 |
73 struct BatchTracker { | 73 struct BatchTracker { |
74 GrColor fColor; | 74 GrColor fColor; |
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 |