From 60cd5b7a48af4a23717201d70395161a3bb4ab24 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Fri, 9 May 2025 22:16:21 +0100 Subject: renderer: always render snapshots as 8bit fixes issues with transparent windows on 10b --- src/render/Framebuffer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/render/Framebuffer.cpp') diff --git a/src/render/Framebuffer.cpp b/src/render/Framebuffer.cpp index ae2ce2a6..ab5a14a3 100644 --- a/src/render/Framebuffer.cpp +++ b/src/render/Framebuffer.cpp @@ -12,6 +12,11 @@ bool CFramebuffer::alloc(int w, int h, uint32_t drmFormat) { uint32_t glFormat = NFormatUtils::drmFormatToGL(drmFormat); uint32_t glType = NFormatUtils::glFormatToType(glFormat); + if (drmFormat != m_drmFormat || m_size != Vector2D{w, h}) + release(); + + m_drmFormat = drmFormat; + if (!m_tex) { m_tex = makeShared(); m_tex->allocate(); -- cgit v1.2.3