Mikhail Dmitrichenko
4eeb22c8be
render: fix multiple mem leaks on err paths
...
Free nested allocations when initialization fails.
Several code paths returned early on error without releasing
memory owned by embedded structures, leading to leaks.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2125 >
2026-03-16 13:26:38 +01:00
Enrico Weigelt, metux IT consult
25fc1a02f5
render: move over public SDK headers to include/
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2026-02-12 17:43:44 +01:00
Enrico Weigelt, metux IT consult
467ab020ab
render: replace DDXPoint by xPoint
...
DDXPoint is just an alias to xPoint
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2026-02-10 16:00:46 +01:00
Enrico Weigelt, metux IT consult
3bd2c8aa1c
render: drop internal server reset support
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2026-02-04 15:49:58 +01:00
Enrico Weigelt, metux IT consult
aa8064be86
render: consistenly name reply structs "reply" instead of "rep"
...
Preparation for future use of generic reply assembly macros.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-12-03 15:16:37 +01:00
Enrico Weigelt, metux IT consult
080a4d5afd
render: drop obsolete pict_t_* defines
...
There just had been for backwards compat with older driver sources
that hadn't been kept up to date yet. Not needed anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 11:58:33 +01:00
Enrico Weigelt, metux IT consult
39cf14d0e9
render: drop PictureScreenPrivateKey and PictureWindowPrivateKey defines
...
Not used by any external drivers, so we can drop them and directly use
the corresponding fields.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 11:58:09 +01:00
Enrico Weigelt, metux IT consult
a0dff9e681
render: replace ProcRenderVector[] by trivial switch/case
...
Not that the entries cannot change anymore, there's no need for having
a separate call table anymore - simply use switch/case.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-19 13:29:35 +01:00
Enrico Weigelt, metux IT consult
51bafc8244
render: drop SProcRenderDispatch() and SProcRenderVector[]
...
Now that we don't have any SProc*'s anymore (everything now done by the
corresponding Proc*'s), there's no need for SProcRenderDispatch() entry
point and the SProcRenderVector[] call table anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-09 17:22:26 +01:00
Enrico Weigelt, metux IT consult
f609b18367
render: XineramaRenderSetPictureClipRectangle(): don't patch request buffer anymore
...
No need for patching up the request buffer anymore - just pass in the correct
value directly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-06 11:23:19 +01:00
Enrico Weigelt, metux IT consult
99590abe52
render: PanoramiXRenderComposite() drop stuff pointer
...
This pointer just had been kept in at previous commit for keeping the
diff small and so easier to review. Now accessing the fields within
the local struct directly, dropping the extra pointer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-06 11:21:52 +01:00
Enrico Weigelt, metux IT consult
d9e0c0451d
render: PanoramiXRenderComposite(): don't patch request buffer anymore
...
No need for patching up the original request buffer anymore - just pass
in a modified copy.
Trying to keep this patch small for easier review. Some cleanups coming
with a follow-up.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-06 11:21:52 +01:00
Enrico Weigelt, metux IT consult
9b2d3ba167
render: consolidate byte-swapping in ProcRenderCreateConicalGradient()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-03 17:24:07 +01:00
kohnish
05524df68b
Build without XINERAMA failing
2025-11-03 17:23:50 +01:00
Enrico Weigelt, metux IT consult
4c4fb5f5f1
render: consolidate byte-swapping in ProcRenderCreateRadialGradient()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-31 13:06:31 +01:00
Enrico Weigelt, metux IT consult
6057540a6c
render: consolidate byte-swapping in ProcRenderCreateLinearGradient()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-30 09:44:56 +01:00
Enrico Weigelt, metux IT consult
0fbb681fce
treewide: use helper dixGetScreenPtr() for retrieving ScreenPtr's
...
Instead of directly accessing the global screenInfo.screens[] array,
let everybody go through a little inline helper. This one also checks
for array bounds - if the screen doesn't exist, return NULL.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-30 09:44:24 +01:00
Enrico Weigelt, metux IT consult
0d4e48188a
render: consolidate byte-swapping in ProcRenderCreateSolidFill()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-29 10:59:12 +01:00
Enrico Weigelt, metux IT consult
1119ccc9be
render: consolidate byte-swapping in ProcRenderAddTraps()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-26 13:57:30 +01:00
Enrico Weigelt, metux IT consult
4d41eaa043
render: consolidate byte-swapping in ProcRenderSetPictureFilter()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-23 13:10:59 +02:00
Enrico Weigelt, metux IT consult
88bced1643
render: consolidate byte-swapping in ProcRenderTriFan()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-21 20:35:15 +02:00
Enrico Weigelt, metux IT consult
007538d86f
render: XineramaRenderChangePicture(): don't patch request buffer anymore
...
No need for patching up the request buffer anymore - just pass in the correct
value directly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-21 20:02:45 +02:00
Enrico Weigelt, metux IT consult
fb5274d7ac
render: consolidate byte-swapping in ProcRenderFillRectangles()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-21 14:17:56 +02:00
Enrico Weigelt, metux IT consult
a641a197f4
render: consolidate byte-swapping in ProcRenderCompositeGlyphs()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-21 10:22:14 +02:00
Enrico Weigelt, metux IT consult
34d4c56432
render: consolidate byte-swapping in ProcRenderTriFan()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-20 11:45:13 +02:00
Enrico Weigelt, metux IT consult
92af1b26ff
render: consolidate byte-swapping in ProcRenderTriStrip()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-07 10:55:23 +02:00
Enrico Weigelt, metux IT consult
0a5815b075
render: consolidate byte-swapping in ProcRenderTriangles()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-02 14:50:14 +02:00
Enrico Weigelt, metux IT consult
19921fd401
dix: unexport ConnectionInfo field
...
Not used by any drivers, so no need to keep it in public SDK.
Since it's not used by any drivers, effectively no ABI change, so
can be safely done within ABI-25.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-01 11:42:50 +02:00
Enrico Weigelt, metux IT consult
962580a15a
treewide: macros lambda-esque screen iteration
...
iterating over screen list via lambda-esque macros calls like this
DIX_FOR_EACH_SCREEN({
do_something
});
withing the body, the iterator variables `walkScreenIdx` and `walkScreen`
are defined and can be directly used (read-only). the code inside the body
is running in a separate scope.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-10-01 11:40:34 +02:00
Enrico Weigelt, metux IT consult
bff6f86afc
render: consolidate byte-swapping in ProcRenderTrapezoids()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-30 10:01:11 +02:00
Enrico Weigelt, metux IT consult
6731d7643a
render: consolidate byte-swapping in ProcRenderFreePicture()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-29 11:22:15 +02:00
Enrico Weigelt, metux IT consult
1439fc7aa1
render: fix missing include in glyphstr.h
...
Need to include renderproto.h
Closes: https://github.com/X11Libre/xserver/issues/700
Reported-By: Kevin Kofler <kevin@tigcc.ticalc.org >
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-26 16:45:16 +02:00
Enrico Weigelt, metux IT consult
b6945455bf
render: consolidate byte-swapping in ProcRenderFreeGlyphs()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-26 15:56:34 +02:00
Enrico Weigelt, metux IT consult
da1509c364
render: consolidate byte-swapping in ProcRenderAddGlyphs()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-26 11:49:18 +02:00
Enrico Weigelt, metux IT consult
56830521c1
render: consolidate byte-swapping in ProcRenderSetPictureClipRectangle()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-26 11:49:10 +02:00
Enrico Weigelt, metux IT consult
f2ce732ef5
treewide: replace PictFormatShort by pixman_format_code_t
...
Try not to use old compat macros anymore, use the real ones instead.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-25 14:28:06 +02:00
Enrico Weigelt, metux IT consult
45af32a981
render: fix missing includes of extinit.h
...
Don't rely on this file just being included indirectly by somebody else
just by accident.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-25 13:48:32 +02:00
Enrico Weigelt, metux IT consult
bb5eeac791
render: consolidate byte-swapping in ProcRenderFreeGlyphSet()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-24 11:40:18 +02:00
Enrico Weigelt, metux IT consult
91902cdd86
render: consolidate byte-swapping in ProcRenderCreatePicture()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-24 11:40:06 +02:00
Enrico Weigelt, metux IT consult
36facd71b5
dix: move request/response related functions to new request_priv.h header
...
Move functions/macros dealing with request parsing or reply assembly/write
out of the big dix_priv.h into their own headers. This new header will also
get more of those function/macros soon (yet still in the pipeline).
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-24 11:32:50 +02:00
Enrico Weigelt, metux IT consult
8fb8ce515e
treewide: replace PICT_FORMAT by PIXMAN_FORMAT
...
Try not to use old compat macros anymore, use the real ones instead.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-23 18:20:09 +02:00
Enrico Weigelt, metux IT consult
53338710d0
render: consolidate byte-swapping in ProcRenderCreatePicture()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-22 12:43:10 +02:00
Enrico Weigelt, metux IT consult
b96cffc80e
render: consolidate byte-swapping in ProcRenderReferenceGlyphSet()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-22 12:42:57 +02:00
Enrico Weigelt, metux IT consult
8439b00fd1
render: consolidate byte-swapping in ProcRenderComposite()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-17 09:37:19 +02:00
Enrico Weigelt, metux IT consult
52ea21c7c2
render: consolidate byte-swapping in ProcRenderCreateAnimCursor()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-17 09:37:01 +02:00
Enrico Weigelt, metux IT consult
141a96237f
render: consolidate byte-swapping in ProcRenderQueryFilters()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-17 09:36:32 +02:00
Enrico Weigelt, metux IT consult
70428787cd
render: consolidate byte-swapping in ProcRenderCreateCursor()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-17 09:36:18 +02:00
Enrico Weigelt, metux IT consult
24885d9019
render: consolidate byte-swapping in ProcRenderCreateGlyphSet()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-17 09:36:06 +02:00
Enrico Weigelt, metux IT consult
fd4f402d12
render: consolidate byte-swapping in ProcRenderQueryPictIndexValues()
...
No need for extra functions and call tables for the few trivial lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-17 09:35:51 +02:00
Enrico Weigelt, metux IT consult
f503962970
render: consolidate duplicate Proc* functions
...
dropping lots of duplicate functions which are doing the same like others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-09-12 15:30:07 +02:00