mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 07:31:53 -07:00
core: refactor and improve surface commit (#9805)
* make CHLBufferReference not a SP anymore * copy over release and acquire points in CHLBufferReference * use CHLBufferReference in screencopy and toplevel export TODO: use CHLBufferReference in direct scanout properly the only problem is the scanout buffer release timing, specifically the onBackendRelease mechanism * cleanup SSurfaceState and surface pending commit tracking * move surface code from DRMSyncobj, and move acquire to SSurfaceState * use queue for comitted pending surface states like proto says "The content update is placed in a queue until it becomes active." - wl_surface::commit * drop, not release, prev buffer if 2nd buffer wl_surface.attach is sent "A wl_buffer that has been attached and then replaced by another attach instead of committed will not receive a release event, and is not used by the compositor." - wl_surface::attach
This commit is contained in:
@@ -1565,10 +1565,10 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
||||
Debug::log(TRACE, "Explicit: can't add sync, monitor has no EGLSync");
|
||||
else {
|
||||
for (auto const& e : explicitPresented) {
|
||||
if (!e->current.buffer || !e->current.buffer->buffer->syncReleaser)
|
||||
if (!e->current.buffer || !e->current.buffer->syncReleaser)
|
||||
continue;
|
||||
|
||||
e->current.buffer->buffer->syncReleaser->addReleaseSync(pMonitor->eglSync);
|
||||
e->current.buffer->syncReleaser->addReleaseSync(pMonitor->eglSync);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user