types: Upgrade buffer ref from WP to SP (#9677)
This commit is contained in:
parent
f6ca4bac51
commit
7ea4fbf0ba
4 changed files with 6 additions and 6 deletions
|
|
@ -1342,7 +1342,7 @@ bool CMonitor::attemptDirectScanout() {
|
||||||
|
|
||||||
const auto PSURFACE = g_pXWaylandManager->getWindowSurface(PCANDIDATE);
|
const auto PSURFACE = g_pXWaylandManager->getWindowSurface(PCANDIDATE);
|
||||||
|
|
||||||
if (!PSURFACE || !PSURFACE->current.texture || !PSURFACE->current.buffer || PSURFACE->current.buffer->buffer.expired())
|
if (!PSURFACE || !PSURFACE->current.texture || !PSURFACE->current.buffer)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (PSURFACE->current.bufferSize != vecPixelSize || PSURFACE->current.transform != transform)
|
if (PSURFACE->current.bufferSize != vecPixelSize || PSURFACE->current.transform != transform)
|
||||||
|
|
@ -1355,7 +1355,7 @@ bool CMonitor::attemptDirectScanout() {
|
||||||
|
|
||||||
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->current.buffer->buffer.get());
|
||||||
|
|
||||||
auto PBUFFER = PSURFACE->current.buffer->buffer.lock();
|
auto PBUFFER = PSURFACE->current.buffer->buffer;
|
||||||
|
|
||||||
if (PBUFFER == output->state->state().buffer) {
|
if (PBUFFER == output->state->state().buffer) {
|
||||||
if (scanoutNeedsCursorUpdate) {
|
if (scanoutNeedsCursorUpdate) {
|
||||||
|
|
|
||||||
|
|
@ -440,7 +440,7 @@ void CWLSurfaceResource::commitPendingState(SSurfaceState& state) {
|
||||||
if (current.texture)
|
if (current.texture)
|
||||||
current.texture->m_eTransform = wlTransformToHyprutils(current.transform);
|
current.texture->m_eTransform = wlTransformToHyprutils(current.transform);
|
||||||
|
|
||||||
if (current.buffer && current.buffer->buffer) {
|
if (current.buffer) {
|
||||||
const auto DAMAGE = accumulateCurrentBufferDamage();
|
const auto DAMAGE = accumulateCurrentBufferDamage();
|
||||||
current.buffer->buffer->update(DAMAGE);
|
current.buffer->buffer->update(DAMAGE);
|
||||||
|
|
||||||
|
|
@ -478,7 +478,7 @@ void CWLSurfaceResource::commitPendingState(SSurfaceState& state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWLSurfaceResource::updateCursorShm(CRegion damage) {
|
void CWLSurfaceResource::updateCursorShm(CRegion damage) {
|
||||||
auto buf = current.buffer ? current.buffer->buffer : WP<IHLBuffer>{};
|
auto buf = current.buffer ? current.buffer->buffer : SP<IHLBuffer>{};
|
||||||
|
|
||||||
if UNLIKELY (!buf)
|
if UNLIKELY (!buf)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class CHLBufferReference {
|
||||||
CHLBufferReference(SP<IHLBuffer> buffer, SP<CWLSurfaceResource> surface);
|
CHLBufferReference(SP<IHLBuffer> buffer, SP<CWLSurfaceResource> surface);
|
||||||
~CHLBufferReference();
|
~CHLBufferReference();
|
||||||
|
|
||||||
WP<IHLBuffer> buffer;
|
SP<IHLBuffer> buffer;
|
||||||
UP<CDRMSyncPointState> acquire;
|
UP<CDRMSyncPointState> acquire;
|
||||||
UP<CDRMSyncPointState> release;
|
UP<CDRMSyncPointState> release;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1531,7 +1531,7 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
||||||
Debug::log(TRACE, "Explicit: can't add sync, monitor has no EGLSync");
|
Debug::log(TRACE, "Explicit: can't add sync, monitor has no EGLSync");
|
||||||
else {
|
else {
|
||||||
for (auto const& e : explicitPresented) {
|
for (auto const& e : explicitPresented) {
|
||||||
if (!e->current.buffer || !e->current.buffer->buffer || !e->current.buffer->buffer->syncReleaser)
|
if (!e->current.buffer || !e->current.buffer->buffer->syncReleaser)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
e->current.buffer->buffer->syncReleaser->addReleaseSync(pMonitor->eglSync);
|
e->current.buffer->buffer->syncReleaser->addReleaseSync(pMonitor->eglSync);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue