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

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

Issue 1467553002: New API for computing optimization invariants. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 de128f211db1ccc9e7b245f77c64faaa08e67df0..3c0c34834f9a6888befb2c7f5d3014e1739515cb 100644
--- a/src/gpu/batches/GrDrawAtlasBatch.h
+++ b/src/gpu/batches/GrDrawAtlasBatch.h
@@ -29,17 +29,17 @@ public:
const char* name() const override { return "DrawAtlasBatch"; }
- void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
+ void computePipelineOptimizations(GrInitInvariantOutput* color,
+ GrInitInvariantOutput* coverage,
+ GrBatchToXPOverrides* overrides) const override {
// When this is called on a batch, there is only one geometry bundle
if (this->hasColors()) {
- out->setUnknownFourComponents();
+ color->setUnknownFourComponents();
} else {
- out->setKnownFourComponents(fGeoData[0].fColor);
+ color->setKnownFourComponents(fGeoData[0].fColor);
}
- }
-
- void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
- out->setKnownSingleComponent(0xff);
+ coverage->setKnownSingleComponent(0xff);
+ overrides->fUsePLSDstRead = false;
}
SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
@@ -47,7 +47,7 @@ public:
private:
void onPrepareDraws(Target*) override;
- void initBatchTracker(const GrPipelineOptimizations&) override;
+ void initBatchTracker(const GrXPOverridesForBatch&) override;
GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, int spriteCount,
const SkRSXform* xforms, const SkRect* rects, const SkColor* colors);
« 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