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

Unified Diff: src/gpu/batches/GrDrawAtlasBatch.h

Issue 2110853004: Even more hiding of Geometry structs in GrBatch subclasses. (Closed) Base URL: https://chromium.googlesource.com/skia.git@moregeom
Patch Set: Address comments Created 4 years, 6 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/GrDefaultPathRenderer.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawAtlasBatch.h
diff --git a/src/gpu/batches/GrDrawAtlasBatch.h b/src/gpu/batches/GrDrawAtlasBatch.h
index 0a3d6136be261bb78fe5514466f11f844656dfb9..d9adf22a60a986e66247c84148ff8a97e7f4ab0a 100644
--- a/src/gpu/batches/GrDrawAtlasBatch.h
+++ b/src/gpu/batches/GrDrawAtlasBatch.h
@@ -16,16 +16,8 @@ class GrDrawAtlasBatch : public GrVertexBatch {
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 @@ public:
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 @@ private:
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;
« no previous file with comments | « src/gpu/batches/GrDefaultPathRenderer.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698