| Index: src/gpu/batches/GrBWFillRectBatch.cpp
|
| diff --git a/src/gpu/batches/GrBWFillRectBatch.cpp b/src/gpu/batches/GrBWFillRectBatch.cpp
|
| index f797e9ef4d39d166e55470792cbca2615344d0ce..6430cf2022d6c8a59244e3ce20999f2604ccee6a 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(),
|
|
|