summaryrefslogtreecommitdiff
path: root/src/protocols/core/Compositor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* config/lua: init lua config manager, use lua if available (#13817)Vaxry2026-04-261-1/+1
| | | Adds a new lua config manager, which will automatically be used if there is a lua config present.
* protocols/compositor: fix presentFeedback being blockedVaxry2026-04-181-3/+0
| | | | ref #14105
* protocols: prune stale subsurface refs in hot traversalsPppp11162026-04-041-12/+44
|
* seat/compositor: fix minor issues (#13958)Pppp11162026-04-021-1/+6
|
* wayland/output: return all bound wl_output instances in outputResourceFrom ↵Vaxry2026-02-201-6/+14
| | | | | (#13315) ref https://github.com/hyprwm/Hyprland/discussions/13301
* compositor: dont unlock all states on empty commits (#13303)Tom Englund2026-02-181-1/+1
| | | | | | we cant unlock all states on empty commits, at best tryProcess them. for example if a state is locked and waiting for a fence to become readable, and another commit comes in we cant unlock it until the fence has actually signaled.
* protocols: commit and presentation timing fixes (#13174)UjinT342026-02-101-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | * move commit timing fields to surface state * fix toTimespec init * update sendQueued api * update onPresented api * set zero copy flag * send clock id * move presented calcs inside condition * use only CLOCK_MONOTONIC for commit/presentation timings * fix setSetTimestamp * do not wait for commit timing while tearing * proto config * fix config defaults
* fifo: miscellaneous fifo fixes (#13136)UjinT342026-02-041-0/+9
| | | | | | | | | | | * LOGM: clang-tidy fix * fix fifo state and scheduling * disable fifo_pending_workaround by default * fix tearing * fix "empty" commit skipping
* renderer: fix frame sync (#13061)UjinT342026-01-221-2/+2
| | | | | | | | | * fix commit timing timer * fix surface state lock/unlock * debug state sync todos * debug solitary vrr
* core/compositor: immediately do readable if adding waiter fails for ↵Vaxry2026-01-051-1/+4
| | | | scheduling state
* render/cm: various updates, remove old protocols (#12693)UjinT342025-12-271-1/+1
| | | | | | | | | | | | | * fix named primaries * default to gamma22 * mark mastering primaries as supported * remove xx-cm and frog support * immutable primaries and image descriptions * clang-format
* rules/windowRuleApplicator: fix min/max size effects (#12491)Vaxry2025-12-271-1/+1
| | | fixes #12412
* debug: move to hyprutils' logger (#12673)Vaxry2025-12-181-7/+7
|
* protocols/compositor: fix null deref on unassigned surface image descVaxry2025-12-081-1/+1
| | | | ref #12603
* desktop: cleanup, unify desktop elements as views (#12563)Vaxry2025-12-081-6/+8
|
* renderer: add quirks:prefer_hdr to fix HDR activation for some clients (#12436)UjinT342025-12-031-0/+4
|
* buffers: revert state merging (#12461)Tom Englund2025-11-251-7/+0
| | | | | | 8e8bfbb0b146fb1f3234b2a3e3e92b63989e1993 added fifo and merged non buffer states before comitting them, something about certain xwl non buffer commits expects a commit to happend and causes regressions as in low fps.
* renderer: Allow DS for surfaces with inert subsurfaces (#12133)Dominick DiMaggio2025-11-111-0/+13
|
* protocols: add Fifo-v1 and commit-timing-v1 (#12052)Tom Englund2025-11-061-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * protocols: add Fifo-v1 introduce fifo-v1 * fifo: only present locked surfaces dont present to unlocked surfaces and commit pending states from the fifo protocol. * fifo: cformat cformat * protocols: add committiming and surface state queue introduce CSurfaceStateQueue and commit-timing-v1 * fifo: schedule a frame if waiting on barrier if we are waiting on a barrier the state doesnt commit until the next refresh cycle meaning the monitor might have no pending damage and we never get onPresented to unlock the barrier, moment 22. so schedule a frame. * fifo: properly check monitor intersection check for m_enteredoutputs or monitor intersection if client hasnt bound one yet, and dont fifo lock it until the surface is mapped. * buffer: try to merge states before committing them try to merge states before committing them meaning way less churn and surface commits if a surface sends multiple small ones while we wait for buffer readyness from either fifo locks or simply fences. * buffer: dont commit states past the buffer certain changes are relative to the buffer attached, cant go beyond it and apply those onto the next buffer. * buffer: set the lockmask directly cant use .lock since the state hasnt been queued yet, set the lockmask directly when exporting buffer fence. * fifo: dont fifo lock on tearing dont fifo lock on tearing. * buffer: queue the state directly queue the state directly and use the .lock function instead of directly modify the lockMask on the state. * buffer: revert creating texture at commit time fifo barriers introduces such long wait that upon commit time a race happends with current xdg configure implentation that the buffer and image is actually destroyed when entering commitState, doing it at buffer creation time with EGL_PRESERVED_KHR means it sticks around until we are done. so revert 82759d4 and 32f3233 for now. * buffer: rename enum and lockreasons eLockReason and LOCK_REASON_NONE. * fifo: workaround direct scanout lock workaround cursor commits causing fifo to get forever locked, this entire thing needs to be worked out.
* buffer: move texture creation to commit time (#11964)Tom Englund2025-10-081-4/+4
| | | | | | | | | | | | | * buffer: move texture creation to commit time move creating texture away from buffer attach into commitstate in an attempt to postpone gpu work until its really needed. best case scenario gpu clocks have ramped up before because we are actively doing things causing surface states and a commit to happend meaning less visible lag. * buffer: simplify texture creation make createTexture return a shared ptr directly, remove not needed member variables as m_success and m_texture.
* compositor: make wl_surface::frame follow pending states (#11953)Tom Englund2025-10-071-44/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * compositor: make pending states store frame callbacks move frame callbacks to pending states so they are only committed in the order they came depending on the buffer wait for readyness. * buffer: damage is relative to current commit ensure the damage is only used once, or we are constantly redrawing things on state commits that isnt a buffer. thanks PlasmaPower. * compositor: move callbacks back to compositor move SSurfaceStateFrameCB back to compositor in the class CWLCallbackResource as per request, but still keep the state as owning. * compositor: ensure commits come in order if a buffer is waiting any commits after it might be non buffer commits from the "future" and applying directly. and when the old buffer that was waiting becomes ready it applies its states and overwrites the future changes. move things to scheduleState and add a m_pendingWaiting guard. and schedule the next pending state from the old buffer commit when done. and as such it loops itself and keeps thing orderly.
* core/compositor: revert make wl_surface::frame follow pending states (#11896)Vaxry2025-10-061-64/+44
| | | | | | | This reverts commit 17e77e0407bebd5d24521012ee1d04b156d6b9f4. Reverted due to severe performance degradation due to accumulating frame callbacks
* core/compositor: make wl_surface::frame follow pending states (#11896)Tom Englund2025-10-061-44/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * compositor: make pending states store frame callbacks move frame callbacks to pending states so they are only committed in the order they came depending on the buffer wait for readyness. * buffer: damage is relative to current commit ensure the damage is only used once, or we are constantly redrawing things on state commits that isnt a buffer. thanks PlasmaPower. * compositor: move callbacks back to compositor move SSurfaceStateFrameCB back to compositor in the class CWLCallbackResource as per request, but still keep the state as owning. * compositor: ensure commits come in order if a buffer is waiting any commits after it might be non buffer commits from the "future" and applying directly. and when the old buffer that was waiting becomes ready it applies its states and overwrites the future changes. move things to scheduleState and add a m_pendingWaiting guard. and schedule the next pending state from the old buffer commit when done. and as such it loops itself and keeps thing orderly.
* renderer: Fix CM for DS and SDR passthrough (#11503)UjinT342025-08-291-0/+4
|
* disable buffer readability checks on intel (#11515)Tom Englund2025-08-241-2/+2
| | | | | | | | | | | | * dmabuf: disable buffer read check on intel readability checks directly on buffer fds on some intel laptops is broken, see https://gitlab.freedesktop.org/drm/intel/-/issues/9415 * sync: use rvalue ref in addwaiter doonreadable use rvalue reference in addwaiter and doonreadable, because we store the function in the SReadableWaiter a lot of the time, move it into place there when that happends or let it go out of scope after function call.
* protocols/wayland: use UP and rvalue refs for callbacks (#11471)Tom Englund2025-08-181-2/+2
| | | use UP and rvalue refs in CWLCallbackResource and m_callbacks.
* refactor: Use new hyprutils casts (#11377)Kamikadze2025-08-141-10/+10
|
* renderer: use CRegion foreach over getRects (#10980)Tom Englund2025-07-301-2/+2
| | | | instead of allocating and returning a vector, use forEach to directly call a function on the rects.
* protocols/subcompositor: fix subsurface sorting (#11136)Vaxry2025-07-201-0/+24
|
* compositor: properly set infinite region on null inputVaxry2025-07-171-1/+1
| | | | fixes #11065
* protocols/cm: Fix preferred image description (#11026)UjinT342025-07-151-1/+14
|
* protocols: Remove incorrect CM proto debug check and fix preferred image ↵UjinT342025-07-141-0/+7
| | | | description (#11023)
* presentation: move to unique ptrsTom Englund2025-07-101-2/+2
| | | | less refcounting, move by rvalue.
* compositor: fix race to finish on null buffer (#10970)Tom Englund2025-07-081-0/+7
| | | | if a null buffer is commited and a pending state is awaiting, drop the pending state so we dont end up in race to finish brokeness.
* compositor: dont send around int max valuesTom Englund2025-07-071-7/+12
| | | | | | we know the buffersize use it instead of int max values that can potentially cause math issues and slowdowns. minor improvement to glmark2 aswell.
* internal: iso C++ prohibits anonymous structs (#10955)Tom Englund2025-07-071-16/+16
| | | turn on -Wpedantic and name the anonymous struct.
* refactor: use std::ranges whenever possible (#10584)Kamikadze2025-05-301-2/+2
|
* render: refactor class member vars (#10292)davc0n2025-05-051-1/+1
| | | | | * render: refactor class member vars * render: fix clang format
* protocols: refactor class member vars (types) (#10261)davc0n2025-05-031-6/+6
|
* protocols: refactor class member vars (core) (#10259)davc0n2025-05-031-187/+187
|
* helpers: refactor class member vars (#10218)davc0n2025-04-301-6/+6
|
* render: properly release rendered buffers (#9807)Ikalco2025-04-301-9/+1
| | | | | | | | | * cleanup eglSync * properly release buffers in renderer * add renderingDoneCallback and use it in screencopy * use static constructor for CEGLSync
* time: move to stl's clocks and move timerVaxry2025-04-161-7/+5
|
* core: wait for dmabuf readiness (#9806)Ikalco2025-04-161-9/+16
| | | | | | | | | * add doOnReadable to event loop manager * move syncTimeline addWaiter to doOnReadable * wait on dmabuf buffers to be readable * don't over synchronize in scanout, also give present feedback on same buffer commit
* compositor/surface: fix surface opaque and input regions not being updated ↵Ikalco2025-04-121-4/+4
| | | | (#10055)
* core: refactor and improve surface commit (#9805)Ikalco2025-04-071-29/+80
| | | | | | | | | | | | | | | | | | | | | | | * 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
* core: Don't damage the entire surface every frame (#9763)Lee Bousfield2025-03-281-8/+12
| | | | | | | * core: Don't damage the entire surface every frame * core: Damage buffer on dims or transform change * core: Use guards for scale and tr equality checks
* surfacestate: track and apply updated stateVaxry2025-03-261-14/+28
| | | | fixes #9729
* core/compositor: Fix dropping cursor buffer data early (#9700)Lee Bousfield2025-03-221-1/+3
|
* core/compositor: Correctly track SHM buffer damage (#9678)Lee Bousfield2025-03-221-39/+14
|