aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrTestMeshDrawOp.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-12-21 09:20:25 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-21 15:12:49 +0000
commit92aee3d6857386f2b5b8e1148e680a7b58e9b1fc (patch)
tree8b54e16b9dbee4411c8e996504872672e1f61fa3 /src/gpu/ops/GrTestMeshDrawOp.h
parentbd81a327b5728b51cac8642128bd2f165d078ef7 (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/GrTestMeshDrawOp.h')
-rw-r--r--src/gpu/ops/GrTestMeshDrawOp.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/gpu/ops/GrTestMeshDrawOp.h b/src/gpu/ops/GrTestMeshDrawOp.h
index 65ee727bc5..2878b6b103 100644
--- a/src/gpu/ops/GrTestMeshDrawOp.h
+++ b/src/gpu/ops/GrTestMeshDrawOp.h
@@ -21,22 +21,6 @@ class GrTestMeshDrawOp : public GrMeshDrawOp {
public:
virtual const char* name() const override = 0;
- void computePipelineOptimizations(GrInitInvariantOutput* color,
- GrInitInvariantOutput* coverage,
- GrBatchToXPOverrides* overrides) const override {
- // When this is called on a batch, there is only one geometry bundle
- color->setKnownFourComponents(fColor);
- coverage->setUnknownSingleComponent();
- }
-
- void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
- overrides.getOverrideColorIfSet(&fColor);
-
- fOptimizations.fColorIgnored = !overrides.readsColor();
- fOptimizations.fUsesLocalCoords = overrides.readsLocalCoords();
- fOptimizations.fCoverageIgnored = !overrides.readsCoverage();
- }
-
protected:
GrTestMeshDrawOp(uint32_t classID, const SkRect& bounds, GrColor color)
: INHERITED(classID), fColor(color) {
@@ -44,6 +28,19 @@ protected:
this->setBounds(bounds, HasAABloat::kYes, IsZeroArea::kYes);
}
+ void getPipelineAnalysisInput(GrPipelineAnalysisDrawOpInput* input) const override {
+ input->pipelineColorInput()->setKnownFourComponents(fColor);
+ input->pipelineCoverageInput()->setUnknownSingleComponent();
+ }
+
+ void applyPipelineOptimizations(const GrPipelineOptimizations& optimizations) override {
+ optimizations.getOverrideColorIfSet(&fColor);
+
+ fOptimizations.fColorIgnored = !optimizations.readsColor();
+ fOptimizations.fUsesLocalCoords = optimizations.readsLocalCoords();
+ fOptimizations.fCoverageIgnored = !optimizations.readsCoverage();
+ }
+
struct Optimizations {
bool fColorIgnored = false;
bool fUsesLocalCoords = false;