summaryrefslogtreecommitdiff
path: root/src/cairo-xcb-connection-shm.c
Commit message (Collapse)AuthorAgeFilesLines
* xcb: Remove free XID cacheUli Schlachter2021-05-021-2/+1
| | | | | | | | | | | | | | cairo-xcb kept a cache of free xid to avoid calling xcb_generate_id() later. However, this is unsafe: When libxcb runs out of ids, it asks the X11 server for an empty range of ids to use. The X11 server of course does not know about cairo's cache and could hand out an id that cairo will use again later. This would then result in BadIdChoice errors later. Fix this by simply removing the whole cache. Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/434 Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Remove useless error handlingUli Schlachter2013-09-161-4/+2
| | | | | | | | | | | | | | | | | | | All the *_reply() functions in XCB return a pointer to their result and as last argument they get a xcb_generic_error_t** where pointers to errors are stored, if any occurs. However, a request can either fail or succeed. This means that if the returned result is a NULL pointer, then an error occurred and the other way around: If the error pointer is set to non-NULL, then the function must have returned NULL. Thus, all the code, which just checks if an error occurred and which does not care about the exact error code, does not need to get the error pointer at all. In this case, xcb will free() the error internally. While doing this, I noticed that _cairo_xcb_connection_get_image() always succeeds and thus its return value can be replaced with the GetImage result. Signed-off-by: Uli Schlachter <psychon@znc.in>
* xcb: Verify extension support before sendingUli Schlachter2012-09-251-0/+4
| | | | | | | | | This commit adds lots of asserts. These asserts verify for each extension request that we send that the server really supports this. Sadly, this causes 28 assertion failures in the test suite with xcb-render-0.0. Signed-off-by: Uli Schlachter <psychon@znc.in>
* Remove if's from Makefile.sourcesAndrea Canciani2011-06-141-0/+4
| | | | | | | | | | | make on win32 complains that: make[1]: Entering directory `/home/ranma42/Code/fdo/cairo/src' ../src/Makefile.sources:220: *** missing separator. Stop. Makefile.sources should not contain if's, which are aoutomake-only conditionals. The correct way to conditionally include files is to enable/disable them using C preprocessor macros.
* Remove an unused field from cairo_xcb_shm_info_tUli Schlachter2011-01-021-6/+4
| | | | Signed-off-by: Uli Schlachter <psychon@znc.in>
* XCB: Stop taking the xcb socketUli Schlachter2010-12-251-94/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the xcb backend use the auto-generated xcb API instead of hand-writing each request. This should also improve parallelism with non-cairo threads that use the same xcb connection. Big thanks to Andrea Canciani for taking a look at this and finding lots of good improvements (especially finding xcb_send_request was great). cairo-perf-trace and cairo-perf-diff-files between master (6732dbf2992891be4b1f08b14a5c449fd08b637c) and this change: $ ./cairo-perf-diff-files ../master_perf ../xcb_no_socket_perf old: master_perf new: xcb_no_socket_perf Speedups ======== xcb-rgba evolution-0 23558.86 (23558.86 0.00%) -> 19338.78 (19338.78 0.00%): 1.22x speedup ▎ xcb-rgba poppler-bug-12266-0 98.43 (98.43 0.00%) -> 82.36 (82.36 0.00%): 1.20x speedup ▎ xcb-rgba gnome-terminal-vim-0 5518.08 (5518.08 0.00%) -> 4905.92 (4905.92 0.00%): 1.12x speedup ▏ xcb-rgba gnome-terminal-20090601-0 45648.46 (45648.46 0.00%) -> 41231.25 (41231.25 0.00%): 1.11x speedup ▏ xcb-rgba evolution-20090607-0 71643.69 (71643.69 0.00%) -> 66314.95 (66314.95 0.00%): 1.08x speedup ▏ xcb-rgba poppler-0 3501.69 (3501.69 0.00%) -> 3322.26 (3322.26 0.00%): 1.05x speedup Slowdowns ========= xcb-rgba gnome-system-monitor-0 7500.01 (7500.01 0.00%) -> 7923.70 (7923.70 0.00%): 1.06x slowdown xcb-rgba swfdec-youtube-full-0 26409.89 (26409.89 0.00%) -> 28430.76 (28430.76 0.00%): 1.08x slowdown ▏ xcb-rgba gnome-system-monitor-20090821-0 34801.61 (34801.61 0.00%) -> 37891.14 (37891.14 0.00%): 1.09x slowdown Signed-off-by: Uli Schlachter <psychon@znc.in>
* Update FSF addressAndrea Canciani2010-04-271-1/+1
| | | | | | | | | | | I updated the Free Software Foundation address using the following script. for i in $(git grep Temple | cut -d: -f1 ) do sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i" done Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
* xcb: Refresh.Chris Wilson2010-01-221-0/+194
Still an experimental backend, it's now a little too late to stabilise for 1.10, but this should represent a major step forward in its feature set and an attempt to catch up with all the bug fixes that have been performed on xlib. Notably not tested yet (and expected to be broken) are mixed-endian connections and low bitdepth servers (the dithering support has not been copied over for instance). However, it seems robust enough for daily use... Of particular note in this update is that the xcb surface is now capable of subverting the xlib surface through the ./configure --enable-xlib-xcb option. This replaces the xlib surface with a proxy that forwards all operations to an equivalent xcb surface whilst preserving the cairo-xlib API that is required for compatibility with the existing applications, for instance GTK+ and Mozilla. Also you can experiment with enabling a DRM bypass, though you need to be extremely foolhardy to do so.