diff options
Diffstat (limited to 'src/gpu/ops/GrDashOp.cpp')
-rw-r--r-- | src/gpu/ops/GrDashOp.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp index 8052795ead..8a9dfe88a7 100644 --- a/src/gpu/ops/GrDashOp.cpp +++ b/src/gpu/ops/GrDashOp.cpp @@ -276,13 +276,6 @@ public: return string; } - void computePipelineOptimizations(GrInitInvariantOutput* color, - GrInitInvariantOutput* coverage, - GrBatchToXPOverrides* overrides) const override { - color->setKnownFourComponents(fColor); - coverage->setUnknownSingleComponent(); - } - private: DashOp(const LineData& geometry, GrColor color, SkPaint::Cap cap, AAMode aaMode, bool fullDash) : INHERITED(ClassID()), fColor(color), fCap(cap), fAAMode(aaMode), fFullDash(fullDash) { @@ -304,15 +297,19 @@ private: this->setTransformedBounds(bounds, combinedMatrix, aaBloat, zeroArea); } - void initBatchTracker(const GrXPOverridesForBatch& overrides) override { - // Handle any color overrides - if (!overrides.readsColor()) { + void getPipelineAnalysisInput(GrPipelineAnalysisDrawOpInput* input) const override { + input->pipelineColorInput()->setKnownFourComponents(fColor); + input->pipelineCoverageInput()->setUnknownSingleComponent(); + } + + void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override { + if (!optimizations.readsColor()) { fColor = GrColor_ILLEGAL; } - overrides.getOverrideColorIfSet(&fColor); + optimizations.getOverrideColorIfSet(&fColor); - fUsesLocalCoords = overrides.readsLocalCoords(); - fCoverageIgnored = !overrides.readsCoverage(); + fUsesLocalCoords = optimizations.readsLocalCoords(); + fCoverageIgnored = !optimizations.readsCoverage(); } struct DashDraw { |