Remove 'hasUserStencilSettings' from GrClip::apply
This doesn't seem necessary. Its only purpose was to disable analytic
clips when there were user stencil settings, which seems like a
de-optimization. The ops that use stencil all seem to properly handle
clip processors in their color pass, so it should be fine to remove
this.
Bug: skia:12047
Change-Id: Ide0ae1004548d62b2feb73c6950bcbcaf6716cfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413099
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/GrClipStack.cpp b/src/gpu/GrClipStack.cpp
index 4058395..c8ef83b 100644
--- a/src/gpu/GrClipStack.cpp
+++ b/src/gpu/GrClipStack.cpp
@@ -1262,8 +1262,7 @@
}
GrClip::Effect GrClipStack::apply(GrRecordingContext* context, GrSurfaceDrawContext* rtc,
- GrAAType aa, bool hasUserStencilSettings,
- GrAppliedClip* out, SkRect* bounds) const {
+ GrAAType aa, GrAppliedClip* out, SkRect* bounds) const {
// TODO: Once we no longer store SW masks, we don't need to sneak the provider in like this
if (!fProxyProvider) {
fProxyProvider = context->priv().proxyProvider();
@@ -1348,13 +1347,6 @@
bool scissorIsNeeded = SkToBool(cs.shader());
int remainingAnalyticFPs = kMaxAnalyticFPs;
- if (hasUserStencilSettings) {
- // Disable analytic clips when there are user stencil settings to ensure the clip is
- // respected in the stencil buffer.
- remainingAnalyticFPs = 0;
- // If we have user stencil settings, stencil needs to be supported.
- SkASSERT(rtc->asRenderTargetProxy()->canUseStencil(*context->priv().caps()));
- }
// If window rectangles are supported, we can use them to exclude inner bounds of difference ops
int maxWindowRectangles = rtc->maxWindowRectangles();