aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrMeshDrawOp.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-27 13:09:36 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-27 17:45:29 +0000
commitc0b642ca48d58416409e555549434066f09692b7 (patch)
tree42de3fb562c64c5bd22f9f7622ba8ae699ad3e08 /src/gpu/ops/GrMeshDrawOp.h
parent88f9c1eff96a12cfa42db5c238ed42623762d90c (diff)
Split GrPipelineInput into separate color and coverage types, the latter of which is just an enum.
Assign names that indicate that they aren't just for the input phase since I plan to use them at the boundary between FPs and XPs as well. Renamed GrProcOptInfo to GrColorFragmentProcessorAnalysis. This is now only used on the color side and the new name seems clearer to me. Change GrMeshDrawOp::getFragmentProcessorAnalysisInputs to use the new color/coverage types directly rather than a class that has been reduced to simply bundling them together. Change-Id: If93bae74c9d590486eecdf63f302418c96deab65 Reviewed-on: https://skia-review.googlesource.com/10161 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/ops/GrMeshDrawOp.h')
-rw-r--r--src/gpu/ops/GrMeshDrawOp.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/gpu/ops/GrMeshDrawOp.h b/src/gpu/ops/GrMeshDrawOp.h
index 4cf7c52672..cbf1f62eb7 100644
--- a/src/gpu/ops/GrMeshDrawOp.h
+++ b/src/gpu/ops/GrMeshDrawOp.h
@@ -33,9 +33,10 @@ public:
const GrProcessorSet& processors,
const GrAppliedClip* appliedClip,
const GrCaps& caps) const {
- FragmentProcessorAnalysisInputs input;
- this->getFragmentProcessorAnalysisInputs(&input);
- analysis->init(*input.colorInput(), *input.coverageInput(), processors, appliedClip, caps);
+ GrPipelineAnalysisColor inputColor;
+ GrPipelineAnalysisCoverage inputCoverage;
+ this->getFragmentProcessorAnalysisInputs(&inputColor, &inputCoverage);
+ analysis->init(inputColor, inputCoverage, processors, appliedClip, caps);
}
void initPipeline(const GrPipeline::InitArgs& args) {
@@ -98,27 +99,13 @@ protected:
return &fPipeline;
}
- /**
- * This describes aspects of the GrPrimitiveProcessor produced by a GrDrawOp that are used in
- * pipeline analysis.
- */
- class FragmentProcessorAnalysisInputs {
- public:
- FragmentProcessorAnalysisInputs() = default;
- GrPipelineInput* colorInput() { return &fColorInput; }
- GrPipelineInput* coverageInput() { return &fCoverageInput; }
-
- private:
- GrPipelineInput fColorInput;
- GrPipelineInput fCoverageInput;
- };
-
private:
/**
* Provides information about the GrPrimitiveProccesor color and coverage outputs which become
* inputs to the first color and coverage fragment processors.
*/
- virtual void getFragmentProcessorAnalysisInputs(FragmentProcessorAnalysisInputs*) const = 0;
+ virtual void getFragmentProcessorAnalysisInputs(GrPipelineAnalysisColor*,
+ GrPipelineAnalysisCoverage*) const = 0;
/**
* After GrPipeline analysis is complete this is called so that the op can use the analysis