Check that coverage FPs are compatible with alpha as coverage
Change-Id: Ic3b6a02248d571e82f6729827c199d358fb75114
Reviewed-on: https://skia-review.googlesource.com/8508
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index 0248beb..838dff8 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -253,8 +253,12 @@
return GrConstColorProcessor::Make(GrColor4f::OpaqueWhite(),
GrConstColorProcessor::kModulateRGBA_InputMode);
}
+ // This could use kIgnore instead of kModulateRGBA but it would trigger a debug print
+ // about a coverage processor not being compatible with the alpha-as-coverage optimization.
+ // We don't really care about this unlikely case so we just use kModulateRGBA to suppress
+ // the print.
return GrConstColorProcessor::Make(GrColor4f::TransparentBlack(),
- GrConstColorProcessor::kIgnore_InputMode);
+ GrConstColorProcessor::kModulateRGBA_InputMode);
}
SkVector t;