New API for computing optimization invariants.
Review URL: https://codereview.chromium.org/1467553002
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index a3a8883..8cd411a 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -1397,22 +1397,22 @@
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 @@
GrStrokeInfo fStroke;
SkMatrix fViewMatrix;
SkRect fClipBounds; // in source space
- GrPipelineOptimizations fPipelineInfo;
+ GrXPOverridesForBatch fPipelineInfo;
typedef GrVertexBatch INHERITED;
};