Make rt bounds dependent on stencil settings for quad optimizations

Before the the consolidation to the internal drawFilledQuad(),
regular draws would use the logical rt bounds to decide if it can be
a fullscreen clear. Stencil rect draws would use the worst case bounds
(needed to pass GrDefaultPathRendererTest).

Initially, the new drawFilledQuad() switched to always using the worst
case bounds to determine fullscreen clears. Since stencil rect draws
used drawFilledQuad(), this was necessary for the path renderer tests to
pass. But this had the side effect of making render targets with approx.
backing storage no longer perform fullscreen clears when a draw would
otherwise cover the logical bounds of the render target.

Normally, this would only be a performance issue, but it also seems to
have exposed a driver bug in the Nexus 5x on Vulkan where the draws
didn't properly fill the backing store. Having attemptQuadOptimization()
choose its rt bounds based on the presence of stencil settings keeps
both tests happy and increases the likelihood of using fullscreen clears.

Change-Id: I6df2c789211f32a4c94bee394d27b7fb4f7293e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222278
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2 files changed