protocols: refactor class member vars (core) (#10259)

This commit is contained in:
davc0n
2025-05-03 16:02:49 +02:00
committed by GitHub
parent 0c736217a7
commit d9cad5e1b6
57 changed files with 1160 additions and 1158 deletions

View File

@@ -1368,20 +1368,20 @@ bool CMonitor::attemptDirectScanout() {
const auto PSURFACE = g_pXWaylandManager->getWindowSurface(PCANDIDATE);
if (!PSURFACE || !PSURFACE->current.texture || !PSURFACE->current.buffer)
if (!PSURFACE || !PSURFACE->m_current.texture || !PSURFACE->m_current.buffer)
return false;
if (PSURFACE->current.bufferSize != m_pixelSize || PSURFACE->current.transform != m_transform)
if (PSURFACE->m_current.bufferSize != m_pixelSize || PSURFACE->m_current.transform != m_transform)
return false;
// we can't scanout shm buffers.
const auto params = PSURFACE->current.buffer->dmabuf();
if (!params.success || !PSURFACE->current.texture->m_pEglImage /* dmabuf */)
const auto params = PSURFACE->m_current.buffer->dmabuf();
if (!params.success || !PSURFACE->m_current.texture->m_pEglImage /* dmabuf */)
return false;
Debug::log(TRACE, "attemptDirectScanout: surface {:x} passed, will attempt, buffer {}", (uintptr_t)PSURFACE.get(), (uintptr_t)PSURFACE->current.buffer.buffer.get());
Debug::log(TRACE, "attemptDirectScanout: surface {:x} passed, will attempt, buffer {}", (uintptr_t)PSURFACE.get(), (uintptr_t)PSURFACE->m_current.buffer.buffer.get());
auto PBUFFER = PSURFACE->current.buffer.buffer;
auto PBUFFER = PSURFACE->m_current.buffer.buffer;
if (PBUFFER == m_output->state->state().buffer) {
PSURFACE->presentFeedback(Time::steadyNow(), m_self.lock());
@@ -1427,7 +1427,7 @@ bool CMonitor::attemptDirectScanout() {
PSURFACE->presentFeedback(Time::steadyNow(), m_self.lock());
m_output->state->addDamage(PSURFACE->current.accumulateBufferDamage());
m_output->state->addDamage(PSURFACE->m_current.accumulateBufferDamage());
m_output->state->resetExplicitFences();
// no need to do explicit sync here as surface current can only ever be ready to read