On 2022-12-03, Farrington, Paul <paul.farring...@fisglobal.com> wrote: > Weve noticed that XDrawRectangle where the GC.line_style is LineOnOffDash has > gotten slower in recent X Server releases. Weve observed this on both Linux > RH8 and FBSD 11.4 and above. There are two sample programs pasted below, one > which draws 5 rectangles with LineSolid and one which draws 5 rectangles with > LineOnOffDash. There is also a makefile for RH8. Running the two programs with > an X Server version 1.18.4, both programs render the rectangles instantly. But > in X Server version 1.20.8 or more obviously 1.20.14, rendering the dashed > line rectangles is much slower. You can watch them being drawn on the screen, > whereas the solid line version still renders instantly.
Interesting. It's still a bug, but your sample programs use an odd way to draw lines - setting the GC function to Clear, leaving foreground and background at default, and using the plane_mask to specify the color. If you draw dashed lines the normal way (with GC function Copy and the color specified in foreground), it's fine - it's the non-trivial plane_mask that appears to be triggering the problem. Quite how Xorg can take human-noticeable time to do masked dashed line draw, I can't imagine!