Commit Graph

8 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult cff509582c randr: unexport and document RRInit()
Not called, and should not be called, by drivers, so no need to
keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:27:28 +02:00
Enrico Weigelt, metux IT consult 4a5fa21098 randr: unexport and document RRResourcesChanged()
Not used by external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:27:26 +02:00
Enrico Weigelt, metux IT consult 93dfd59d81 randr: unexport and document RRDeliverScreenEvent()
Not used by external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:27:22 +02:00
Enrico Weigelt, metux IT consult aff4f8979e randr: move remaining dispatch prototypes to rrdispatch.h
Since we now have a separate header for them, move them all over to there.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:27:20 +02:00
Enrico Weigelt, metux IT consult 058815bed1 randr: use explicit case statement instead of SProcRandrVector table
No need to go indirectly through a vector table, since everything's fixed
anyways. It's not a pretty robust programming style: any changes need great
care, in order to not mix up things.

Replacing this by direct switch/case statement, which is using the defines
from the xrandr protocol headers. Also adding a little bit more protection
against subtle programming errors and reducing cognitive load (source size)
on understanding the code by using a tiny macro for deducing define name and
function name from the request's name.

This approach actually uncovered some subtle bug that had been waiting in
the dark for over 15 years.

As collateral benefit, getting a tiny bit better performance.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1794>
2025-02-24 20:30:26 +00:00
Enrico Weigelt, metux IT consult 42677ae1e3 randr: use explicit case statement instead of ProcRandrVector table
No need to go indirectly through a vector table, since everything's fixed
anyways. It's not a pretty robust programming style: any changes need great
care, in order to not mix up things.

Replacing this by direct switch/case statement, which is using the defines
from the xrandr protocol headers. Also adding a little bit more protection
against subtle programming errors and reducing cognitive load (source size)
on understanding the code by using a tiny macro for deducing define name and
function name from the request's name.

This approach actually uncovered some subtle bug that had been waiting in the
dark for over 15 years (see commit b87314c876)

As collateral benefit, getting a tiny bit better performance.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1794>
2025-02-24 20:30:26 +00:00
Enrico Weigelt, metux IT consult ed17224403 randr: let SProc*'s call their Proc*'s directly
No need to go indirectly through an vector table. It's much clearer and
easier to understand when calling them directly. And a tiny bit performance
improvement as collateral benefit.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1794>
2025-02-24 20:30:26 +00:00
Enrico Weigelt, metux IT consult eda769f34c randr: move private definitons from randrstr.h to randrstr_priv.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1291>
2024-02-22 23:47:49 +00:00