sw_engine: fix a regression bug

invalidate cached compositors when target size is changed.
compositors must be re-initialized with a new size.

regression bug by ca3c1fc1b9
This commit is contained in:
Hermet Park 2024-01-19 17:05:06 +09:00 committed by Hermet Park
parent e8a319268a
commit 95e424eb5b

View file

@ -420,6 +420,8 @@ bool SwRenderer::target(pixel_t* data, uint32_t stride, uint32_t w, uint32_t h,
{
if (!data || stride == 0 || w == 0 || h == 0 || w > stride) return false;
clearCompositors();
if (!surface) surface = new SwSurface;
surface->data = data;