Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions docs/COVERAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The status column uses three buckets:
|--------------------------|------------|-------|
| Display lifecycle | Functional | `XOpenDisplay`, default screen and visual, `ConnectionNumber` for `select()` integration. |
| Windows | Functional | Creation, mapping, hierarchy, attribute queries, destruction, debug introspection. |
| Drawables and GCs | Partial | Lines, points, rectangles, single-arc `XDrawArc`/`XFillArc`, text, line attributes, foreground/background, clip rectangles. `XFillPolygon`, `XDrawArcs`, and `XFillArcs` are stubs. |
| Drawables and GCs | Functional | Lines, points, rectangles, polygons, single and batched arcs, text, line attributes, foreground/background, clip rectangles, and GC raster functions for solid point/line/rectangle/polygon draws. |
| Pixmaps | Functional | `XCreatePixmap`, `XCopyArea`, double-buffering patterns. |
| Images | Functional | `XCreateImage` / `XPutImage` / `XGetImage` for ZPixmap and bitmap formats. |
| Events | Functional | Expose, key, button, motion, configure, enter/leave, focus, client message, mapping notify. |
Expand Down Expand Up @@ -50,10 +50,23 @@ The status column uses three buckets:
- Mouse wheel input surfaces as `Button4` / `Button5` (vertical) and
`Button6` / `Button7` (horizontal) `ButtonPress` events with the current
modifier state, matching Xorg server convention.
- `GXinvert` is supported on filled rectangles through a read-back, invert,
and blit path. Other raster ops (`GXxor`, `GXand`, ...) silently fall back
to `GXcopy`; `XSetFunction` stores the requested value but the drawing
paths only act on `GXinvert`.
- GC raster functions (`GXclear` through `GXset`) are supported for solid
`XDrawPoint` / `XDrawPoints`, `XDrawLine` / `XDrawLines` / `XDrawSegments`,
`XFillRectangle` / `XFillRectangles`, and `XFillPolygon` through a software
read-back, mutate, and blit path when SDL has no direct renderer equivalent.
- Large solid `XDrawArc` / `XFillArc` calls route through the in-tree
arc-to-cubic path accelerator and scanline raster path. Small `LineSolid`
one-pixel arcs stay on the legacy point renderer to avoid regressing tiny
primitive overhead, but `ArcChord` fills, dashed line styles, and any
`lineWidth > 1` are always routed through the path accelerator so the
legacy pie-only / dotty fallbacks never run. Wide solid strokes and
`LineOnOffDash` / `LineDoubleDash` use the path stroke expansion for line,
segment, rectangle, polyline, and large arc drawing. The stroke outline
builder honors `JoinMiter` (with the X11 default miter-limit of 10),
`JoinBevel`, `JoinRound`, and `CapButt` / `CapRound` / `CapProjecting`.
Polygon region creation shares the same path edge/span builder and uses
pixman region union for final storage. Tile, stipple, non-solid fill,
and non-copy raster ops still use the pre-accelerator drawing paths.

## Compatibility limits

Expand Down
3 changes: 1 addition & 2 deletions docs/PORTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ because they have no in-process analogue:
- GLX or any OpenGL-via-X11 surface creation.
- A real, conformant XIM input method server.
- ICC color-managed output through Xcms conversions.
- Wide polygon and multi-arc rendering (`XFillPolygon`, `XDrawArcs`,
`XFillArcs`) until those entry points are implemented.
- Advanced path rendering beyond the current polygon and arc primitives.

For those cases the library is best used as a stepping stone: it keeps the
application running on the new platform while the affected subsystem is
Expand Down
2 changes: 1 addition & 1 deletion mk/sources.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SRCS := $(wildcard src/*.c)
SRCS := $(wildcard src/*.c) $(wildcard src/path/*.c)

# Upstream libX11 translation units staged by mk/upstream-headers.mk via
# scripts/sync-upstream-headers.py. The Makefile compiles them in place so
Expand Down
6 changes: 5 additions & 1 deletion mk/tests.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CHECK_BINS := $(OUT)/tests/check $(OUT)/tests/symbol-coverage
BENCH_BINS := $(OUT)/tests/bench-paths

.PHONY: check symbol-coverage api-symbol-coverage
.PHONY: check symbol-coverage api-symbol-coverage bench-paths

## Build and run the regression test suite
check: $(CHECK_BINS)
Expand All @@ -18,6 +19,9 @@ symbol-coverage: $(OUT)/tests/symbol-coverage api-symbol-coverage
api-symbol-coverage: $(TARGET) tests/api-symbols.txt tests/check-api-symbols.py
$(PYTHON) tests/check-api-symbols.py $(TARGET) tests/api-symbols.txt

bench-paths: $(BENCH_BINS)
SDL_VIDEODRIVER=dummy $(OUT)/tests/bench-paths

$(OUT)/tests/%: tests/%.c $(TARGET)
@mkdir -p $(dir $@)
@echo " CC $<"
Expand Down
Loading
Loading