Different approach to fixing gpu blurs on platforms that "useDrawInsteadOfClear"
This CL reverts https://skia-review.googlesource.com/c/5148/ (Fix gpu blurring on platforms that "useDrawInsteadOfClear") (all the worstCaseWidth/Height stuff) and adds a new GrRenderTargetContext entry point (absClear) to specify clears that can't be discarded or altered.
BUG=skia:
Change-Id: I18b1373ecf4a153ca8c0f290ab8b1d00770426da
Reviewed-on: https://skia-review.googlesource.com/5484
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp
index 13e6024..e2ce046 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -268,8 +268,8 @@
return true;
}
- SkRect devBounds = SkRect::MakeIWH(renderTargetContext->worstCaseWidth(),
- renderTargetContext->worstCaseHeight());
+ SkRect devBounds = SkRect::MakeIWH(renderTargetContext->width(),
+ renderTargetContext->height());
if (!devBounds.intersect(out->clippedDrawBounds())) {
return false;
}
@@ -299,8 +299,8 @@
#ifdef SK_DEBUG
SkASSERT(reducedClip.hasIBounds());
- SkIRect rtIBounds = SkIRect::MakeWH(renderTargetContext->worstCaseWidth(),
- renderTargetContext->worstCaseHeight());
+ SkIRect rtIBounds = SkIRect::MakeWH(renderTargetContext->width(),
+ renderTargetContext->height());
SkIRect clipIBounds = reducedClip.ibounds().makeOffset(-fOrigin.x(), -fOrigin.y());
SkASSERT(rtIBounds.contains(clipIBounds)); // Mask shouldn't be larger than the RT.
#endif