From bb1ffb08870012844b35e05639e19f631cfc9245 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Tue, 30 Aug 2022 16:16:38 +0800 Subject: [PATCH] shaped-texture: Don't clear mipmaps during painting This reverts an attempt at saving texture memory that was introduced recently in 16fa2100. It was misguided because the same texture may be needed in the next frame if a window has multiple previews visible on screen at once (gnome-shell's overview). Keeping the mipmaps around seems to reduce the peak render times of the overview by roughly 5%-10%. Part-of: --- src/compositor/meta-shaped-texture.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index bea77c1a1..b3e087af9 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -635,9 +635,6 @@ do_paint_content (MetaShapedTexture *stex, { min_filter = COGL_PIPELINE_FILTER_NEAREST; mag_filter = COGL_PIPELINE_FILTER_NEAREST; - - /* Back to normal desktop viewing. Save some memory */ - meta_texture_mipmap_clear (stex->texture_mipmap); } else {