From c1128e7f8ab888c60b1b7657332720f72843c206 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 24 Jul 2019 20:16:38 -0700 Subject: [PATCH] ui/app/internal/gpu: only apply clear optimization for rect clips Signed-off-by: Elias Naur --- ui/app/internal/gpu/gpu.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/internal/gpu/gpu.go b/ui/app/internal/gpu/gpu.go index c5cf3db6..121f9ca6 100644 --- a/ui/app/internal/gpu/gpu.go +++ b/ui/app/internal/gpu/gpu.go @@ -711,7 +711,7 @@ loop: } bounds := boundRectF(clip) mat := state.materialFor(d.cache, op.Rect, off, bounds) - if bounds.Min == (image.Point{}) && bounds.Max == d.viewport && mat.opaque && mat.material == materialColor { + if bounds.Min == (image.Point{}) && bounds.Max == d.viewport && state.rect && mat.opaque && mat.material == materialColor { // The image is a uniform opaque color and takes up the whole screen. // Scrap images up to and including this image and set clear color. d.zimageOps = d.zimageOps[:0]