Move willColorBlendWithDst from pipeline builder to GrPipelineOptimizations.
Review URL: https://codereview.chromium.org/1285193004
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index a2b6d7f..8f149f5 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -120,6 +120,13 @@
if (SkToBool(optFlags & GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag)) {
opts->fFlags |= GrPipelineOptimizations::kCanTweakAlphaForCoverage_Flag;
}
+
+ GrXPFactory::InvariantBlendedColor blendedColor;
+ builder.fXPFactory->getInvariantBlendedColor(args.fColorPOI, &blendedColor);
+ if (blendedColor.fWillBlendWithDst) {
+ opts->fFlags |= GrPipelineOptimizations::kWillColorBlendWithDst_Flag;
+ }
+
return pipeline;
}