From 74418106de6b493d2ea4bce793ce666c12a417d3 Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 19 Oct 2021 05:09:54 -0400 Subject: [PATCH] [client] egl: skip downscale filter setup when not enabled Since this->prepared will never be set to true unless the filter is enabled, this results in the framebuffer setup being done every frame for no reason, causing a lot of texture reallocations. --- client/renderers/EGL/filter_downscale.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/renderers/EGL/filter_downscale.c b/client/renderers/EGL/filter_downscale.c index 6aaab8a1..9a26ded2 100644 --- a/client/renderers/EGL/filter_downscale.c +++ b/client/renderers/EGL/filter_downscale.c @@ -333,6 +333,9 @@ static bool egl_filterDownscaleSetup(EGL_Filter * filter, width = (float)width / this->pixelSize; height = (float)height / this->pixelSize; + if (!this->enable) + return false; + if (this->prepared && pixFmt == this->pixFmt && this->width == width &&