Commit graph

7 commits

Author SHA1 Message Date
Uli Schlachter
c16094fc44 xcb: Remove free XID cache
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>
2021-05-02 17:49:32 +02:00
Uli Schlachter
b33d83ad49 xcb: Verify extension support before sending
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>
2012-09-25 11:27:59 +02:00
Uli Schlachter
c0dc933efd xcb: Remove CAIRO_XCB_RENDER_HAS_COMPOSITE_SPANS
This flag was only ever tested, but never set. Also, there is no X11 server out
there which actually supports this.

AFAIK it was just an experiment which turned into dead code.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-28 15:54:02 +01:00
Uli Schlachter
109fcb3950 XCB: Stop taking the xcb socket
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
(6732dbf299) 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>
2010-12-25 09:50:34 +00:00
Chris Wilson
e540d040bd xcb: trivial memfault fixes.
The first fixes required to kick-start memfault testing of the xcb
backend.
2010-05-10 13:36:53 +01:00
Andrea Canciani
b8a7f8621a Update FSF address
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
2010-04-27 11:13:38 +02:00
Chris Wilson
1236c41072 xcb: Refresh.
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.
2010-01-22 23:01:52 +00:00