Fix CompatibleCoverageAsAlpha flag when reducing src-over to src.
Change-Id: I087ff64e0f23aee15ac2bf7b9d3c450e28400cef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274036
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index 359dfb0..bcfa550 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -166,6 +166,9 @@
result = GrPorterDuffXPFactory::SrcOverAnalysisProperties(color, coverage, caps,
clampType);
}
+ if (coverage == GrProcessorAnalysisCoverage::kNone) {
+ result |= AnalysisProperties::kCompatibleWithCoverageAsAlpha;
+ }
SkASSERT(!(result & AnalysisProperties::kRequiresDstTexture));
if ((result & AnalysisProperties::kReadsDstInShader) &&
!caps.shaderCaps()->dstReadInShaderSupport()) {