core/surface/buffer: Buffer lock/release fixes (#7110)

This commit is contained in:
Vaxry
2024-07-31 20:47:26 +01:00
committed by GitHub
parent 5489682799
commit 37e1411e8d
27 changed files with 304 additions and 129 deletions

View File

@@ -1097,18 +1097,18 @@ bool CWindow::opaque() {
if (PWORKSPACE->m_fAlpha.value() != 1.f)
return false;
if (m_bIsX11 && m_pXWaylandSurface && m_pXWaylandSurface->surface && m_pXWaylandSurface->surface->current.buffer)
return m_pXWaylandSurface->surface->current.buffer->opaque;
if (m_bIsX11 && m_pXWaylandSurface && m_pXWaylandSurface->surface && m_pXWaylandSurface->surface->current.texture)
return m_pXWaylandSurface->surface->current.texture->m_bOpaque;
if (!m_pWLSurface->resource() || !m_pWLSurface->resource()->current.buffer)
if (!m_pWLSurface->resource() || !m_pWLSurface->resource()->current.texture)
return false;
// TODO: this is wrong
const auto EXTENTS = m_pXDGSurface->surface->current.opaque.getExtents();
if (EXTENTS.w >= m_pXDGSurface->surface->current.buffer->size.x && EXTENTS.h >= m_pXDGSurface->surface->current.buffer->size.y)
if (EXTENTS.w >= m_pXDGSurface->surface->current.bufferSize.x && EXTENTS.h >= m_pXDGSurface->surface->current.bufferSize.y)
return true;
return m_pWLSurface->resource()->current.buffer->opaque;
return m_pWLSurface->resource()->current.texture->m_bOpaque;
}
float CWindow::rounding() {