summaryrefslogtreecommitdiff
path: root/src/protocols/core/Compositor.hpp
Commit message (Collapse)AuthorAgeFilesLines
* render/cm: add ICC profile pipeline (#12711)Vaxry2026-03-041-1/+1
| | | Adds an ICC profile pipeline, loading via config and applying via 3D LUTs.
* protocols: commit and presentation timing fixes (#13174)UjinT342026-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* render/cm: various updates, remove old protocols (#12693)UjinT342025-12-271-2/+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
* desktop: cleanup, unify desktop elements as views (#12563)Vaxry2025-12-081-2/+2
|
* renderer: Allow DS for surfaces with inert subsurfaces (#12133)Dominick DiMaggio2025-11-111-0/+1
|
* chore: fix non-relative imports (#12228)Amadej Kastelic2025-11-061-1/+1
|
* protocols: add Fifo-v1 and commit-timing-v1 (#12052)Tom Englund2025-11-061-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* compositor: make wl_surface::frame follow pending states (#11953)Tom Englund2025-10-071-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-14/+5
| | | | | | | 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-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/+1
|
* protocols/wayland: use UP and rvalue refs for callbacks (#11471)Tom Englund2025-08-181-3/+3
| | | use UP and rvalue refs in CWLCallbackResource and m_callbacks.
* protocols/subcompositor: fix subsurface sorting (#11136)Vaxry2025-07-201-0/+1
|
* protocols/cm: Fix preferred image description (#11026)UjinT342025-07-151-0/+2
|
* protocols: Remove incorrect CM proto debug check and fix preferred image ↵UjinT342025-07-141-0/+2
| | | | description (#11023)
* core: use new typed signals from hu (#10853)outfoxxed2025-07-081-7/+7
|
* protocols: refactor class member vars (core) (#10259)davc0n2025-05-031-27/+27
|
* time: move to stl's clocks and move timerVaxry2025-04-161-3/+4
|
* core: refactor and improve surface commit (#9805)Ikalco2025-04-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | * 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/Compositor.hpp: fix non-relative Texture import (#9703)entailz2025-03-231-1/+1
|
* core/compositor: Correctly track SHM buffer damage (#9678)Lee Bousfield2025-03-221-2/+1
|
* syncobj: use eventfd instead of stalling fd checks (#9437)Tom Englund2025-03-141-41/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * syncobj: cleanup and use uniqueptrs cleanup a bit missing removals if resource not good, erasing from containers etc. make use of unique ptrs instead. and add default destructors. * syncobj: rework syncobj entirerly remove early buffer release that was breaking explicit sync, the buffer needs to exist until the surface commit event has been emitted and draw calls added egl sync points, move to eventfd signaling instead of stalling sync point checks, and recommit pending commits if waiting on a signal. add a CDRMSyncPointState helper class. move a few weak pointers to shared pointers so they dont destruct before we need to use them. * syncobj: queue pending states for eventfd eventfd requires us to queue pending stats until ready and then apply to current, and also when no ready state exist commit the client commit on the current existing buffer, if there is one. * syncobj: clear current buffer damage clear current buffer damage on current buffer commits. * syncobj: cleanup code and fix hyprlock remove unused code, and ensure we dont commit a empty texture causing locksession protocol and gtk4-layer-shell misbehaving. * syncobj: ensure buffers are cleaned up ensure the containers having the various buffers actually gets cleaned up from their containers, incase the CSignal isnt signaled because of expired smart pointers or just wrong order destruction because mishaps. also move the acquire/point setting to buffer attaching. instead of on precommit. * syncobj: remove unused code, optimize remove unused code and merge sync fds if fence is valid, remove manual directscanout buffer dropping that signals release point on pageflip, it can cause us to signal the release point while still keeping the current buffer and rendering it yet again causing wrong things. * syncobj: delay buffer release on non syncobj delay buffer releases on non syncobj surfaces until next commit, and check on async buffers if syncobj and drop and signal the release point on backend buffer release. * syncobj: ensure we follow protocol ensure we follow protocol by replacing acquire/release points if they arrive late and replace already existing ones. also remove unneded brackets, and dont try to manual lock/release buffers when it comes to explicit protocol. it doesnt care about buffer releases only about acquire and release points and signaling them. * syncobj: lets not complicate things set points in precommit, before checking protocol errors and we catch any pending acquire/release points arriving late. * syncobj: move SSurfaceState to types remove destructor resource destroying, let resources destroys them on their events, and move SSurfaceStates to types/SurfaceState.hpp * syncobj: actually store the merged fd have to actually store the mergedfd to use it. * syncobj: cleanup a bit around fences ensure the current asynchronous buffer is actually released on pageflip not the previous. cleanup a bit FD handling in commitPendingAndDoExplicitSync, and reuse the in fence when syncing surfaces. * syncobjs: ensure fence FD doesnt leak calling resetexplicitfence without properly ensuring the FD is closed before will leak it, store it per monitor and let it close itself with the CFileDescriptor class. * syncobj: ensure buffers are actually released buffers were never being sent released properly. * types: Defer buffer sync releaser until unlock * syncobj: store directscanout fence in monitor ensure the infence fd survives the scope of attemptdirectscanout so it doesnt close before it should have. * syncobj: check if if acquire is expired we might hit a race to finish on exit where the timeline just has destructed but the buffer waiter is still pending. and such we removeAllWaiters null dereferences. * syncobj: code style changes remove quack comment, change to m_foo and use a std::vector and weakpointer in the waiter for removal instead of a std::list. * syncobj: remove unused async buffer drop remove unused async buffer drop, only related to directscanout and is handled elsewhere. --------- Co-authored-by: Lee Bousfield <ljbousfield@gmail.com>
* protocols: Support wp color management proto (#9444)UjinT342025-02-261-11/+13
| | | Adds support for the recently merged w-p CM protocol alongside the (now deprecated) old CM WIP protocols
* protocols: Support content-type-v1 proto (#9226)UjinT342025-02-021-0/+2
|
* core: move all shared_ptrs from the STL to hyprutils (#9143)Vaxry2025-01-231-1/+0
|
* core: Add support for HDR and color management protocols (#8715)UjinT342025-01-071-0/+3
|
* Renderer: rewrite render scheduling (#8683)Vaxry2024-12-221-1/+1
| | | This rewrites renderer scheduling. Occlusion is now unified in a new Pass type.
* pointer: add drm dumb buffers for cursors (#8399)Vaxry2024-11-141-1/+1
| | | | | --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* internal: few more marginal optimisations from profiling (#8271)Tom Englund2024-10-281-1/+1
| | | | | | | | | | | | | | | | | * deco: reduce local temporars and function calls profiling shows this is a high used function, reduce the amount of function calls and local temporar copies and also check if we even need to add extents at all in the loop. * popup: optimize bfhelper in popups pass nodes as const reference and reserve the size of the children node vector help reduce the reallocations. * procotol: make compositor bfhelper use const ref use const ref for nodes and reserve second nodes vector size to reduce amount of reallocation needed.
* internal: cleanup CMonitor usage and fix a few ref hogsVaxry2024-10-261-4/+4
| | | | ref #8221
* output: send enter events on late wl_output bindsVaxry2024-10-161-0/+2
| | | | fixes #6560
* presentation-feedback: minor fixupsVaxry2024-08-301-1/+1
|
* wayland/compositor: introduce client commit eventsVaxry2024-08-071-2/+3
|
* renderer: Explicit sync fixes (#7151)Vaxry2024-08-061-2/+3
| | | | | Enables explicit sync by default for most platforms `misc:no_direct_scanout` -> `render:direct_scanout`
* core/surface/buffer: Buffer lock/release fixes (#7110)Vaxry2024-07-311-13/+22
|
* core/surface: fixup a few pointer handling edge casesVaxry2024-07-291-0/+1
|
* input: refocus last window on keyboard unfocusable surfacesvaxerski2024-07-271-4/+4
| | | | fixes #4460
* wayland/compositor: fixup double buffer releasesvaxerski2024-07-271-3/+0
| | | | fixes #7043
* Core: Move to aquamarine (#6608)Vaxry2024-07-211-2/+12
| | | | | | | | | | | | | | Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <vaxry@vaxry.net> Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Co-authored-by: vaxerski <vaxerski@users.noreply.github.com> Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com> Co-authored-by: Tom Englund <tomenglund26@gmail.com> Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com> Co-authored-by: diniamo <diniamo53@gmail.com>
* core: Move to hyprutils for MathVaxry2024-06-191-1/+1
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* wayland/core: move to new impl (#6268)Vaxry2024-06-081-0/+175
* wayland/core/dmabuf: move to new impl it's the final countdown