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.
Commit-Queue: Michael Ludwig <firstname.lastname@example.org>
Commit-Queue: Greg Daniel <email@example.com>
Auto-Submit: Michael Ludwig <firstname.lastname@example.org>
Reviewed-by: Greg Daniel <email@example.com>
2 files changed