xserver/miext
Jeremy Huddleston Sequoia d7279b8e4f rootless: Add Trapezoids, Triangles, and CompositeRects wrapping
The Render extension's Trapezoids and Triangles operations
(fbTrapezoids, fbTriangles) render directly via pixman through
fbShapes without going through ps->Composite, so RootlessComposite
never fires for these operations.  This means RootlessStartDrawing
is not called and the macOS compositor is not notified of changed
pixels.

Add RootlessTrapezoids and RootlessTriangles wrappers following the
same pattern as RootlessComposite: call RootlessStartDrawing before
the operation, then compute the bounding box via miTrapezoidBounds or
miTriangleBounds and call RootlessDamageBox after.  The default
miTriStrip and miTriFan implementations decompose their input into
triangles and dispatch through ps->Triangles, so the RootlessTriangles
wrapper covers TriStrip and TriFan as well.

Also add a RootlessCompositeRects wrapper as defense-in-depth.  The
current miCompositeRects implementation already has partial rootless
coverage: PictOpSrc/PictOpClear go through the GC layer, and other
ops route through CompositePicture -> RootlessComposite.  Wrapping at
the PictureScreen level ensures robustness regardless of the underlying
implementation.

Fixes [1/2]: https://github.com/XQuartz/XQuartz/issues/31

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 40b762cf6d)
2026-03-24 20:59:02 -07:00
..
damage meson: hide C API if Xorg is disabled (like autotools) 2021-03-11 00:22:36 +00:00
rootless rootless: Add Trapezoids, Triangles, and CompositeRects wrapping 2026-03-24 20:59:02 -07:00
shadow meson: hide C API if Xorg is disabled (like autotools) 2021-03-11 00:22:36 +00:00
sync Drop XWayland DDX 2021-09-15 21:49:17 +03:00
Makefile.am rootless: Build unconditionally 2015-07-08 16:41:28 -04:00