Make analysis optional to GrPipeline::init().
GrXPFactory::createXferProcessor now takes GrPipelineAnalysisColor and GrPipelineAnalysisCoverage rather than GrProcessorSet::FragmentProcessorAnalysis.
This will make it so ops do not have to retain the analysis or rerun it to create pipelines at flush time.
Change-Id: Ib28ba65de425b20c2647329275f209aec168c3df
Reviewed-on: https://skia-review.googlesource.com/10474
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/instanced/InstancedRendering.cpp b/src/gpu/instanced/InstancedRendering.cpp
index d75af35..2550f9d 100644
--- a/src/gpu/instanced/InstancedRendering.cpp
+++ b/src/gpu/instanced/InstancedRendering.cpp
@@ -466,6 +466,7 @@
state->gpu()->handleDirtyContext();
+ // TODO: Don't reanalyze the processors.
GrProcessorSet::FragmentProcessorAnalysis analysis;
GrPipelineAnalysisCoverage coverageInput;
if (GrAAType::kCoverage == fInfo.aaType() ||
@@ -485,7 +486,8 @@
GrPipeline pipeline;
GrPipeline::InitArgs args;
- args.fAnalysis = &analysis;
+ args.fInputColor = analysis.outputColor();
+ args.fInputCoverage = analysis.outputCoverage();
args.fAppliedClip = clip;
args.fCaps = &state->caps();
args.fProcessors = &fProcessors;