Add query to GrXPFactory about coverage-as-alpha optimization
This will be needed to have GrDrawOps that haven't yet built pipelines.
Change-Id: If5292aaa5dc9f98dccbe27be98960b630332158d
Reviewed-on: https://skia-review.googlesource.com/9480
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index 8895d7c..81b9e45 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -331,6 +331,8 @@
bool willReadDstInShader(const GrCaps&, const FragmentProcessorAnalysis&) const override;
+ bool compatibleWithCoverageAsAlpha(bool colorIsOpaque) const override { return true; }
+
GR_DECLARE_XP_FACTORY_TEST;
SkBlendMode fMode;