aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers/Monitor.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-07-31 20:47:26 +0100
committerGitHub <[email protected]>2024-07-31 21:47:26 +0200
commit37e1411e8d94fe8f3fb678588a7df9b8f931910f (patch)
treece91aa3984b646f8a8569976edb8e78c85919ee5 /src/helpers/Monitor.cpp
parent548968279926a73d7ff19a9a185c977c50d56756 (diff)
downloadHyprland-37e1411e8d94fe8f3fb678588a7df9b8f931910f.tar.gz
Hyprland-37e1411e8d94fe8f3fb678588a7df9b8f931910f.zip
core/surface/buffer: Buffer lock/release fixes (#7110)
Diffstat (limited to 'src/helpers/Monitor.cpp')
-rw-r--r--src/helpers/Monitor.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index 377825fb..1cf1b069 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -801,17 +801,16 @@ bool CMonitor::attemptDirectScanout() {
const auto PSURFACE = g_pXWaylandManager->getWindowSurface(PCANDIDATE);
- if (!PSURFACE || !PSURFACE->current.buffer || PSURFACE->current.buffer->size != vecPixelSize || PSURFACE->current.transform != transform)
+ if (!PSURFACE || !PSURFACE->current.buffer || PSURFACE->current.bufferSize != vecPixelSize || PSURFACE->current.transform != transform)
return false;
// we can't scanout shm buffers.
- if (!PSURFACE->current.buffer->dmabuf().success)
+ if (!PSURFACE->current.buffer || !PSURFACE->current.texture || !PSURFACE->current.texture->m_pEglImage /* dmabuf */)
return false;
// FIXME: make sure the buffer actually follows the available scanout dmabuf formats
// and comes from the appropriate device. This may implode on multi-gpu!!
-
- output->state->setBuffer(PSURFACE->current.buffer);
+ output->state->setBuffer(PSURFACE->current.buffer->buffer.lock());
output->state->setPresentationMode(tearingState.activelyTearing ? Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_IMMEDIATE :
Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_VSYNC);