aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrBWFillRectBatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/batches/GrBWFillRectBatch.cpp')
-rw-r--r--src/gpu/batches/GrBWFillRectBatch.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/gpu/batches/GrBWFillRectBatch.cpp b/src/gpu/batches/GrBWFillRectBatch.cpp
index f797e9ef4d..6430cf2022 100644
--- a/src/gpu/batches/GrBWFillRectBatch.cpp
+++ b/src/gpu/batches/GrBWFillRectBatch.cpp
@@ -44,6 +44,26 @@ public:
out->setKnownSingleComponent(0xff);
}
+ SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
+
+private:
+ BWFillRectBatch(const Geometry& geometry) {
+ this->initClassID<BWFillRectBatch>();
+ fGeoData.push_back(geometry);
+
+ fBounds = geometry.fRect;
+ geometry.fViewMatrix.mapRect(&fBounds);
+ }
+
+ GrColor color() const { return fBatch.fColor; }
+ bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; }
+ bool colorIgnored() const { return fBatch.fColorIgnored; }
+ const SkMatrix& viewMatrix() const { return fGeoData[0].fViewMatrix; }
+ const SkMatrix& localMatrix() const { return fGeoData[0].fLocalMatrix; }
+ bool hasLocalRect() const { return fGeoData[0].fHasLocalRect; }
+ bool hasLocalMatrix() const { return fGeoData[0].fHasLocalMatrix; }
+ bool coverageIgnored() const { return fBatch.fCoverageIgnored; }
+
void initBatchTracker(const GrPipelineOptimizations& init) override {
// Handle any color overrides
if (!init.readsColor()) {
@@ -113,26 +133,6 @@ public:
helper.recordDraw(target);
}
- SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
-
-private:
- BWFillRectBatch(const Geometry& geometry) {
- this->initClassID<BWFillRectBatch>();
- fGeoData.push_back(geometry);
-
- fBounds = geometry.fRect;
- geometry.fViewMatrix.mapRect(&fBounds);
- }
-
- GrColor color() const { return fBatch.fColor; }
- bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; }
- bool colorIgnored() const { return fBatch.fColorIgnored; }
- const SkMatrix& viewMatrix() const { return fGeoData[0].fViewMatrix; }
- const SkMatrix& localMatrix() const { return fGeoData[0].fLocalMatrix; }
- bool hasLocalRect() const { return fGeoData[0].fHasLocalRect; }
- bool hasLocalMatrix() const { return fGeoData[0].fHasLocalMatrix; }
- bool coverageIgnored() const { return fBatch.fCoverageIgnored; }
-
bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
BWFillRectBatch* that = t->cast<BWFillRectBatch>();
if (!GrPipeline::CanCombine(*this->pipeline(), this->bounds(), *that->pipeline(),