From 82759d4095dc95a0d10aefe87072385dce9a4bf1 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Wed, 8 Oct 2025 22:25:55 +0200 Subject: buffer: move texture creation to commit time (#11964) * buffer: move texture creation to commit time move creating texture away from buffer attach into commitstate in an attempt to postpone gpu work until its really needed. best case scenario gpu clocks have ramped up before because we are actively doing things causing surface states and a commit to happend meaning less visible lag. * buffer: simplify texture creation make createTexture return a shared ptr directly, remove not needed member variables as m_success and m_texture. --- src/protocols/LinuxDMABUF.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/protocols/LinuxDMABUF.cpp') diff --git a/src/protocols/LinuxDMABUF.cpp b/src/protocols/LinuxDMABUF.cpp index c7de03a2..0ad804c3 100644 --- a/src/protocols/LinuxDMABUF.cpp +++ b/src/protocols/LinuxDMABUF.cpp @@ -103,9 +103,6 @@ CLinuxDMABuffer::CLinuxDMABuffer(uint32_t id, wl_client* client, Aquamarine::SDM m_listeners.bufferResourceDestroy.reset(); PROTO::linuxDma->destroyResource(this); }); - - if (!m_buffer->m_success) - LOGM(ERR, "Possibly compositor bug: buffer failed to create"); } CLinuxDMABuffer::~CLinuxDMABuffer() { @@ -217,7 +214,7 @@ void CLinuxDMABUFParamsResource::create(uint32_t id) { auto& buf = PROTO::linuxDma->m_buffers.emplace_back(makeUnique(id, m_resource->client(), *m_attrs)); - if UNLIKELY (!buf->good() || !buf->m_buffer->m_success) { + if UNLIKELY (!buf->good()) { m_resource->sendFailed(); PROTO::linuxDma->m_buffers.pop_back(); return; -- cgit v1.2.3