Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: src/gpu/batches/GrBWFillRectBatch.cpp

Issue 1301663002: Privatize GrBatch subclass overrides (Closed) Base URL: https://skia.googlesource.com/skia.git@drawsonvb
Patch Set: more Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(),
« no previous file with comments | « src/gpu/batches/GrAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698