diff options
author | Vaxry <[email protected]> | 2024-08-02 13:21:25 +0200 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-08-03 18:23:44 +0200 |
commit | a9a394fa338dacad2ee07ea87818e85513fd77b4 (patch) | |
tree | 148ecb014eae37d0a65fa432637f9af210bf4b44 | |
parent | ac5f6217a7978080e85359205b6df73d9fa995c6 (diff) | |
download | Hyprland-a9a394fa338dacad2ee07ea87818e85513fd77b4.tar.gz Hyprland-a9a394fa338dacad2ee07ea87818e85513fd77b4.zip |
stuff
-rw-r--r-- | src/helpers/sync/SyncTimeline.cpp | 5 | ||||
-rw-r--r-- | src/helpers/sync/SyncTimeline.hpp | 1 | ||||
-rw-r--r-- | src/protocols/types/WLBuffer.cpp | 6 | ||||
-rw-r--r-- | src/render/Renderer.cpp | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/src/helpers/sync/SyncTimeline.cpp b/src/helpers/sync/SyncTimeline.cpp index 352120ea..16b5bd92 100644 --- a/src/helpers/sync/SyncTimeline.cpp +++ b/src/helpers/sync/SyncTimeline.cpp @@ -188,3 +188,8 @@ bool CSyncTimeline::transfer(SP<CSyncTimeline> from, uint64_t fromPoint, uint64_ return true; } + +void CSyncTimeline::signal(uint64_t point) { + if (drmSyncobjTimelineSignal(drmFD, &handle, &point, 1)) + Debug::log(ERR, "CSyncTimeline::signal: drmSyncobjTimelineSignal failed"); +} diff --git a/src/helpers/sync/SyncTimeline.hpp b/src/helpers/sync/SyncTimeline.hpp index 3d868a95..88ad4921 100644 --- a/src/helpers/sync/SyncTimeline.hpp +++ b/src/helpers/sync/SyncTimeline.hpp @@ -35,6 +35,7 @@ class CSyncTimeline { int exportAsSyncFileFD(uint64_t src); bool importFromSyncFileFD(uint64_t dst, int fd); bool transfer(SP<CSyncTimeline> from, uint64_t fromPoint, uint64_t toPoint); + void signal(uint64_t point); int drmFD = -1; uint32_t handle = 0; diff --git a/src/protocols/types/WLBuffer.cpp b/src/protocols/types/WLBuffer.cpp index d34a867d..1a991943 100644 --- a/src/protocols/types/WLBuffer.cpp +++ b/src/protocols/types/WLBuffer.cpp @@ -34,12 +34,6 @@ void CWLBufferResource::sendRelease() { void CWLBufferResource::sendReleaseWithSurface(SP<CWLSurfaceResource> surf) { sendRelease(); - - if (!surf || !surf->syncobj) - return; - - if (drmSyncobjTimelineSignal(g_pCompositor->m_iDRMFD, &surf->syncobj->releaseTimeline->timeline->handle, &surf->syncobj->releasePoint, 1)) - Debug::log(ERR, "sendReleaseWithSurface: drmSyncobjTimelineSignal failed"); } wl_resource* CWLBufferResource::getResource() { diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 0d92bdc5..13231594 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1445,8 +1445,10 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(CMonitor* pMonitor) { close(pMonitor->output->state->state().explicitInFence); if (pMonitor->output->state->state().explicitOutFence >= 0) { - if (ok) + if (ok) { pMonitor->outTimeline->importFromSyncFileFD(pMonitor->commitSeq, pMonitor->output->state->state().explicitOutFence); + pMonitor->outTimeline->signal(pMonitor->commitSeq); + } close(pMonitor->output->state->state().explicitOutFence); } |