diff options
| author | vaxerski <vaxry@vaxry.net> | 2025-05-09 22:16:21 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2025-05-09 22:16:21 +0100 |
| commit | 60cd5b7a48af4a23717201d70395161a3bb4ab24 (patch) | |
| tree | 2f2a8313c181880408be9cb9c3cb431778ac4d2b /src/render/Framebuffer.cpp | |
| parent | 25cf06f6cfe1b23b97d9beae91247413a3683803 (diff) | |
renderer: always render snapshots as 8bit
fixes issues with transparent windows on 10b
Diffstat (limited to 'src/render/Framebuffer.cpp')
| -rw-r--r-- | src/render/Framebuffer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<CTexture>(); m_tex->allocate(); |
