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

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

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/GrTInstanceBatch.h ('k') | src/gpu/batches/GrTestBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index a3a888302a15ee775f2ba88208f77b0678ff0b06..8cd411a49f8e2b21127831f403b0f410365b755f 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -1397,22 +1397,22 @@ public:
const char* name() const override { return "TessellatingPathBatch"; }
- void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
- out->setKnownFourComponents(fColor);
- }
-
- void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
- out->setUnknownSingleComponent();
+ void computePipelineOptimizations(GrInitInvariantOutput* color,
+ GrInitInvariantOutput* coverage,
+ GrBatchToXPOverrides* overrides) const override {
+ color->setKnownFourComponents(fColor);
+ coverage->setUnknownSingleComponent();
+ overrides->fUsePLSDstRead = false;
}
private:
- void initBatchTracker(const GrPipelineOptimizations& opt) override {
+ void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
// Handle any color overrides
- if (!opt.readsColor()) {
+ if (!overrides.readsColor()) {
fColor = GrColor_ILLEGAL;
}
- opt.getOverrideColorIfSet(&fColor);
- fPipelineInfo = opt;
+ overrides.getOverrideColorIfSet(&fColor);
+ fPipelineInfo = overrides;
}
int tessellate(GrUniqueKey* key,
@@ -1621,7 +1621,7 @@ private:
GrStrokeInfo fStroke;
SkMatrix fViewMatrix;
SkRect fClipBounds; // in source space
- GrPipelineOptimizations fPipelineInfo;
+ GrXPOverridesForBatch fPipelineInfo;
typedef GrVertexBatch INHERITED;
};
« no previous file with comments | « src/gpu/batches/GrTInstanceBatch.h ('k') | src/gpu/batches/GrTestBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698