Skip to content

X11 segments#21399

Draft
linev wants to merge 10 commits intoroot-project:masterfrom
linev:x11_segments
Draft

X11 segments#21399
linev wants to merge 10 commits intoroot-project:masterfrom
linev:x11_segments

Conversation

@linev
Copy link
Member

@linev linev commented Feb 26, 2026

Introduce methods to provide meaningful access to X11 XDrawSegments functionality

This should reduce total number of X11 calls and improve performance of slow remote X11 displays
But for that one really need to use such functionality in the code

As first exercise try to modify TGaxis painter where many ticks drawn with separate calls.
Instead collect all them together and call DrawSegments at the end.

linev added 10 commits February 26, 2026 14:52
Idea to have interface which handle painting of many segments at once. On platforms like X11 drawing of many lines at once can be performed with single call
Apply clip condition, draw on virtualx and virtualps
Here no clipping is required,
for VirtualPS coordinates need to be recalculated
Make lambda to paint ticks at specified index/position
So reduce code duplication when painting extra ticks
on left and right sides.
Prepare code to fill buffers for segments painting
First collect all ticks and grids positions in the vector
and then call function at the end
In SVG files all grids lines drawn together after all ticks so
order is changed.
But produced image will not change while grids always drawn on the top of the ticks

PS image can reduce in size while now attributes not switched between ticks and grids all the time
Provide default implementation to ensure that
all possible derived classes will work with new code
So first recalculate/clip buffers and then call methods
@linev linev self-assigned this Feb 26, 2026
@linev linev marked this pull request as draft February 26, 2026 20:53
@github-actions
Copy link

Test Results

    22 files      22 suites   3d 7h 2m 50s ⏱️
 3 807 tests  3 754 ✅ 1 💤 52 ❌
75 691 runs  75 630 ✅ 9 💤 52 ❌

For more details on these failures, see this check.

Results for commit bb1c142.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant