diff options
author | Uli Schlachter <psychon@znc.in> | 2010-12-04 16:36:28 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-25 09:50:34 +0000 |
commit | 109fcb39502239ff87c70cc99f2baea6e46b36a5 (patch) | |
tree | 1763e250a56c4ed126b4be27ff65c81c43568be8 /src/cairo-xcb-surface-core.c | |
parent | cf0a4ed862d93b7e6d7d26942cfe98a50beccd4c (diff) | |
download | cairo-109fcb39502239ff87c70cc99f2baea6e46b36a5.tar.gz |
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
(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>
Diffstat (limited to 'src/cairo-xcb-surface-core.c')
-rw-r--r-- | src/cairo-xcb-surface-core.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/cairo-xcb-surface-core.c b/src/cairo-xcb-surface-core.c index 3fbb07228..f12d7354d 100644 --- a/src/cairo-xcb-surface-core.c +++ b/src/cairo-xcb-surface-core.c @@ -64,10 +64,8 @@ _cairo_xcb_pixmap_finish (void *abstract_surface) if (unlikely (status)) return status; - if (_cairo_xcb_connection_take_socket (surface->connection) == CAIRO_STATUS_SUCCESS) { - _cairo_xcb_connection_free_pixmap (surface->connection, - surface->pixmap); - } + _cairo_xcb_connection_free_pixmap (surface->connection, + surface->pixmap); _cairo_xcb_connection_release (surface->connection); } @@ -472,10 +470,6 @@ _cairo_xcb_surface_core_copy_boxes (cairo_xcb_surface_t *dst, if (unlikely (status)) return status; - status = _cairo_xcb_connection_take_socket (dst->connection); - if (unlikely (status)) - goto CLEANUP_CONNECTION; - src = _cairo_xcb_pixmap_for_pattern (dst, src_pattern, extents); status = src->base.status; if (unlikely (status)) @@ -566,12 +560,6 @@ _cairo_xcb_surface_core_fill_boxes (cairo_xcb_surface_t *dst, if (unlikely (status)) return status; - status = _cairo_xcb_connection_take_socket (dst->connection); - if (unlikely (status)) { - _cairo_xcb_connection_release (dst->connection); - return status; - } - gc = _cairo_xcb_screen_get_gc (dst->screen, dst->drawable, dst->depth); #if 0 |