Commit graph

265 commits

Author SHA1 Message Date
Vaxry
31cc7f3b87
core: move workspace ptrs to weak (#11194)
Fixes some race conditions that come up in tests. We only clean up workspaces when we render a frame. With this, they are always cleared instantly.
2025-07-24 00:36:29 +02:00
UjinT34
e15014e031
protocols/cm: Fix preferred image description (#11026) 2025-07-15 19:33:14 +02:00
Tom Englund
e6bb809663 monintor: remove rathandler
is this even used? lets just remove it.
2025-07-11 17:51:04 +02:00
Kamikadze
c6497a7193
internal: Prevent double-free in attemptDirectScanout (#10974) 2025-07-09 14:39:36 +02:00
78e9eddfb6
core: use new typed signals from hu (#10853) 2025-07-08 18:56:40 +02:00
Vaxry
8f948827a6
Renderer: Implement new render scheduling (#10936)
Implements a new render scheduling method, where we triple buffer when necessary.

Enabled by default, improves FPS on underpowered devices.

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2025-07-08 12:41:10 +02:00
aphelei
e9c5594186
renderer: add mouse zoom animations (#10882)
Adds animations for the mouse zoom effect.
2025-07-01 11:33:48 +02:00
3bbdf9dc5a
protocols: add ext-workspace implementation (#10818) 2025-06-26 18:32:44 +02:00
UjinT34
cf7e3aa448
renderer/cm: Add automatic hdr (#9785) 2025-06-23 14:33:09 +02:00
UjinT34
c3894d9288
config/monitor: Add monitor v2 HDR rules (#10623) 2025-06-15 12:15:18 +02:00
Joel-Valenciano
ad85406220
drm-lease: Add Multi-GPU Support (#10099) 2025-06-13 15:17:32 +02:00
412c7dc7f7
renderer: fixup some missing fadeout cases with special
fixes some fadeout missing cases:

- closing last window
- closing above fs
- closing in general

fixes #10283
2025-06-11 17:52:23 +02:00
Kamikadze
66b99bd277
monitor: ensure autoDir is applied when changed (#10672) 2025-06-07 21:12:43 +01:00
Kamikadze
69c2b2926e
internal: refactor to use empty() (#10599) 2025-05-31 19:49:50 +01:00
Kamikadze
9190443d95
refactor: use std::ranges whenever possible (#10584) 2025-05-30 14:25:59 +01:00
9b327ddfd1 monitor: mark 0, 0 presentation timestamps as invalid
fixes #10562
2025-05-27 21:26:47 +02:00
Nikolaos Karaolidis
c2805aad92
config: add maxwidth monitor resolution mode (#10528)
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-05-26 19:25:58 +02:00
CyrenArkade
1ce614dfc0
animations: Add option for animating workspaces as if the first and last were adjacent (#10277)
* add option for animating workspaces as if the first and last were adjacent

* change wraparound detection to use IDs instead of dispatcher

* move shouldWraparound from MiscFunctions to Monitor
2025-05-06 03:54:27 +02:00
shane blackthorne
ec93f8a1cd
socket2: add monitorremovedv2 event (#10229) 2025-05-06 03:52:36 +02:00
davc0n
997fefbc11
render: refactor class member vars (#10292)
* render: refactor class member vars

* render: fix clang format
2025-05-05 23:44:49 +02:00
Vaxry
c7eb141098
renderer: always try to apply a mode if pixel size is invalid (#10291) 2025-05-05 23:40:37 +02:00
davc0n
46ac115bd1
protocols: refactor class member vars (types) (#10261) 2025-05-03 18:54:50 +02:00
Honkazel
3465efcdc1
internal: Use vecnotinrect instead of !vecinrect (#10262)
* monitor: use vecnotinrect

* inputmanager: vecnotinrect

* clang format
2025-05-03 18:54:15 +02:00
davc0n
d9cad5e1b6
protocols: refactor class member vars (core) (#10259) 2025-05-03 16:02:49 +02:00
davc0n
50e1bec85f
helpers: refactor class member vars (#10218) 2025-04-30 23:45:20 +02:00
Ikalco
2ee5118d7a
render: properly release rendered buffers (#9807)
* cleanup eglSync

* properly release buffers in renderer

* add renderingDoneCallback and use it in screencopy

* use static constructor for CEGLSync
2025-04-30 18:35:25 +02:00
davc0n
2118440488
windows: refactor class member vars (#10168) 2025-04-28 22:25:22 +02:00
davc0n
02d7badd15
workspaces: refactor class member vars (#10167) 2025-04-25 02:37:12 +02:00
davc0n
0e80ecc534
layers: refactor class member vars (#10149)
* layers: refactor class member vars

* popups: rename m_WLSurface to m_wlSurface
2025-04-24 20:49:49 +02:00
davc0n
241a4935a2
compositor: refactor class member vars (#10141) 2025-04-22 15:23:29 +02:00
davc0n
400dd16072
debug: refactor class member vars (#10130) 2025-04-21 20:42:02 +02:00
davc0n
4d14bcb02f
config: Refactor class member vars (#10124)
* Refactor config classes vars

* Fix clang format errors
2025-04-20 20:39:33 +02:00
Lee Bousfield
7631d4c73f
render, helpers: Call OpenGL destroyMonitorResources on disconnect (#10111)
* render, helpers: Call OpenGL destroyMonitorResources on disconnect

* helpers: Add opengl null check
2025-04-18 17:37:51 +02:00
877fb5b93a time: move to stl's clocks and move timer 2025-04-16 01:37:48 +01:00
Ikalco
0e521788bc
core: wait for dmabuf readiness (#9806)
* 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
2025-04-16 01:02:31 +02:00
MightyPlaza
ffd6cf65e4
windowrules: allow incrementing window props (#9566) 2025-04-16 01:00:40 +02:00
Nathan Ollerenshaw
533bc5115e
monitors: fix disconnected monitors are reconnected to an empty workspace (#9874)
---------

Co-authored-by: nyx <nnyyxxxx@protonmail.com>
2025-04-14 11:07:53 +02:00
Ikalco
da86db43d4
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
2025-04-07 21:03:27 +02:00
Emad Elsaid
da2d7c3971
config: Fix matching monitor by description to allow space prefix (#9788) 2025-03-30 03:12:15 +02:00
Lee Bousfield
6384f4acf4
core/compositor: Correctly track SHM buffer damage (#9678) 2025-03-22 17:13:44 +01:00
Lee Bousfield
279b06044c
screencopy, render: Use explicit sync for screencopy (#9697)
* screencopy, render: Use explicit sync for screencopy

* screencopy: Check if explicit sync is enabled

* screencopy: Don't require explicit KMS enabled
2025-03-22 17:01:14 +01:00
Lee Bousfield
7ea4fbf0ba
types: Upgrade buffer ref from WP to SP (#9677) 2025-03-20 11:08:47 +00:00
Ikalco
5f60fc7d00
renderer: only commit hw cursor stuff if needed (#9654) 2025-03-17 22:06:41 +01:00
Lee Bousfield
c4f46473df
monitor: Optimize direct scanout damage (#9653) 2025-03-17 22:05:44 +01:00
Lee Bousfield
011d7ccb91
internal: Fix compiler warnings (#9646) 2025-03-17 15:52:40 +01:00
Ikalco
5cef2f44fe
renderer: allow commits when buffer is unchanged but cursor changed (#9648) 2025-03-17 13:06:58 +01:00
Tom Englund
6ffde36466
syncobj: use eventfd instead of stalling fd checks (#9437)
* 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>
2025-03-14 15:08:20 +01:00
UjinT34
8c97cb7858
renderer: add simple color management (#9506)
Adds proper color management and transformations for CM surfaces.
2025-03-14 00:15:18 +01:00
Ikalco
d30cc19d25
renderer: skip ds commits if buffer didn't change (#9556)
this fixes direct scanout glitches by ensuring that attemptDirectScanout doesn't try to recommit the same buffer to AQ
which would cause a pageflip event and the backendRelease to release the same buffer too early
2025-03-08 20:24:22 +01:00
Matt White
b51ab182ae
socket2: add activespecialv2 (#9530) 2025-03-05 20:33:33 +01:00