Even more hiding of Geometry structs in GrBatch subclasses.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2110853004
Review-Url: https://codereview.chromium.org/2110853004
diff --git a/src/gpu/batches/GrDrawAtlasBatch.h b/src/gpu/batches/GrDrawAtlasBatch.h
index 0a3d613..d9adf22 100644
--- a/src/gpu/batches/GrDrawAtlasBatch.h
+++ b/src/gpu/batches/GrDrawAtlasBatch.h
@@ -16,16 +16,8 @@
public:
DEFINE_BATCH_CLASS_ID
- struct Geometry {
- GrColor fColor;
- SkTArray<uint8_t, true> fVerts;
- };
-
- static GrDrawBatch* Create(const Geometry& geometry, const SkMatrix& viewMatrix,
- int spriteCount, const SkRSXform* xforms, const SkRect* rects,
- const SkColor* colors) {
- return new GrDrawAtlasBatch(geometry, viewMatrix, spriteCount, xforms, rects, colors);
- }
+ GrDrawAtlasBatch(GrColor color, const SkMatrix& viewMatrix, int spriteCount,
+ const SkRSXform* xforms, const SkRect* rects, const SkColor* colors);
const char* name() const override { return "DrawAtlasBatch"; }
@@ -41,16 +33,11 @@
coverage->setKnownSingleComponent(0xff);
}
- SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
-
private:
void onPrepareDraws(Target*) const override;
void initBatchTracker(const GrXPOverridesForBatch&) override;
- GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, int spriteCount,
- const SkRSXform* xforms, const SkRect* rects, const SkColor* colors);
-
GrColor color() const { return fColor; }
bool colorIgnored() const { return fColorIgnored; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
@@ -59,6 +46,12 @@
bool coverageIgnored() const { return fCoverageIgnored; }
bool onCombineIfPossible(GrBatch* t, const GrCaps&) override;
+
+ struct Geometry {
+ GrColor fColor;
+ SkTArray<uint8_t, true> fVerts;
+ };
+
SkSTArray<1, Geometry, true> fGeoData;
SkMatrix fViewMatrix;