diff options
author | Brian Salomon <bsalomon@google.com> | 2016-12-21 09:20:25 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-21 15:12:49 +0000 |
commit | 92aee3d6857386f2b5b8e1148e680a7b58e9b1fc (patch) | |
tree | 8b54e16b9dbee4411c8e996504872672e1f61fa3 /src/gpu/ops/GrRegionOp.cpp | |
parent | bd81a327b5728b51cac8642128bd2f165d078ef7 (diff) |
This renames methods and classes that relate to static analysis of combinations of GrDrawOps and GrPipelines.
Change-Id: I737b901a19d3c67d2ff7f95802fb4df35656beb2
Reviewed-on: https://skia-review.googlesource.com/6199
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/ops/GrRegionOp.cpp')
-rw-r--r-- | src/gpu/ops/GrRegionOp.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/gpu/ops/GrRegionOp.cpp b/src/gpu/ops/GrRegionOp.cpp index e98bbf0261..1128b927b2 100644 --- a/src/gpu/ops/GrRegionOp.cpp +++ b/src/gpu/ops/GrRegionOp.cpp @@ -79,22 +79,19 @@ public: return str; } - void computePipelineOptimizations(GrInitInvariantOutput* color, - GrInitInvariantOutput* coverage, - GrBatchToXPOverrides* overrides) const override { - // When this is called there is only one region. - color->setKnownFourComponents(fRegions[0].fColor); - coverage->setKnownSingleComponent(0xff); +private: + void getPipelineAnalysisInput(GrPipelineAnalysisDrawOpInput* input) const override { + input->pipelineColorInput()->setKnownFourComponents(fRegions[0].fColor); + input->pipelineCoverageInput()->setKnownSingleComponent(0xff); } - void initBatchTracker(const GrXPOverridesForBatch& overrides) override { - overrides.getOverrideColorIfSet(&fRegions[0].fColor); - fOverrides = overrides; + void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override { + optimizations.getOverrideColorIfSet(&fRegions[0].fColor); + fOptimizations = optimizations; } -private: void onPrepareDraws(Target* target) const override { - sk_sp<GrGeometryProcessor> gp = make_gp(fOverrides.readsCoverage(), fViewMatrix); + sk_sp<GrGeometryProcessor> gp = make_gp(fOptimizations.readsCoverage(), fViewMatrix); if (!gp) { SkDebugf("Couldn't create GrGeometryProcessor\n"); return; @@ -149,7 +146,7 @@ private: }; SkMatrix fViewMatrix; - GrXPOverridesForBatch fOverrides; + GrPipelineOptimizations fOptimizations; SkSTArray<1, RegionInfo, true> fRegions; typedef GrMeshDrawOp INHERITED; |