[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.
This commit is contained in:
Quantum 2021-10-19 05:09:54 -04:00 committed by Geoffrey McRae
parent c9e8de334a
commit 74418106de

View file

@ -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 &&