diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-05-01 15:44:22 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-05-06 14:31:45 +0100 |
commit | fda95868020effcbc56ff687a763af650a758ba2 (patch) | |
tree | 629ce1a94a3205130fe7aed95a26ff22e4980e26 /src/cairo-xlib-private.h | |
parent | 8457374c9cf350841a7c16f1ef1657aeb354e5c9 (diff) | |
download | cairo-fda95868020effcbc56ff687a763af650a758ba2.tar.gz |
[cairo-xlib] Cache standard xrender formats.
XRender performs a round-trip in order to query the available formats on
the xserver, before searching for a matching format. In order to save
that round-trip and to avoid the short-lived allocation of the array of
available formats, we cache the result on the display.
Diffstat (limited to 'src/cairo-xlib-private.h')
-rw-r--r-- | src/cairo-xlib-private.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-xlib-private.h b/src/cairo-xlib-private.h index 2d9737d93..a88e6b532 100644 --- a/src/cairo-xlib-private.h +++ b/src/cairo-xlib-private.h @@ -34,6 +34,7 @@ #define CAIRO_XLIB_PRIVATE_H #include "cairo-xlib.h" +#include "cairo-xlib-xrender-private.h" #include "cairo-compiler-private.h" #include "cairo-freelist-private.h" @@ -61,6 +62,8 @@ struct _cairo_xlib_display { Display *display; cairo_xlib_screen_info_t *screens; + XRenderPictFormat *cached_xrender_formats[CAIRO_FORMAT_A1 + 1]; + cairo_xlib_job_t *workqueue; cairo_freelist_t wq_freelist; @@ -118,6 +121,10 @@ _cairo_xlib_display_queue_resource (cairo_xlib_display_t *display, cairo_private void _cairo_xlib_display_notify (cairo_xlib_display_t *display); +cairo_private XRenderPictFormat * +_cairo_xlib_display_get_xrender_format (cairo_xlib_display_t *display, + cairo_format_t format); + cairo_private cairo_xlib_screen_info_t * _cairo_xlib_screen_info_get (Display *display, Screen *screen); |