diff options
author | Uli Schlachter <psychon@znc.in> | 2014-12-06 16:04:46 +0100 |
---|---|---|
committer | Uli Schlachter <psychon@znc.in> | 2015-01-17 20:11:59 +0100 |
commit | b47209a03feeed2172f35a6d79ba1176fedd5e17 (patch) | |
tree | 694595b113636933a3f91c7f92ee0bcff0bd4169 /src/cairo-xcb-private.h | |
parent | 02e4efc961be40d266d4df0acaf3271219529017 (diff) | |
download | cairo-b47209a03feeed2172f35a6d79ba1176fedd5e17.tar.gz |
xcb: Query the display's subpixel order via RENDER
With commit e691d242, the xcb backend started parsing the resources, just like
cairo-xlib does. One behavior from cairo-xlib was missing: If no Xft.rgba
property was specified, cairo-xlib defaults to the screen's subpixel order.
This commit brings that last bit of functionality to cairo-xcb (but currently
disabled due to commit e0c0a673).
This commits adds a new array to cairo_xcb_connection_t that contains the
subpixel order for each screen. There is also a new member in cairo_xcb_screen_t
which contains the subpixel order of that screen and which is initialized from
the array when the screen is constructed. With this in place, the
resource-parsing code can just pick the subpixel order from the screen if
needed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src/cairo-xcb-private.h')
-rw-r--r-- | src/cairo-xcb-private.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-xcb-private.h b/src/cairo-xcb-private.h index 1e1d1ee70..214fa458b 100644 --- a/src/cairo-xcb-private.h +++ b/src/cairo-xcb-private.h @@ -181,7 +181,8 @@ struct _cairo_xcb_font { struct _cairo_xcb_screen { cairo_xcb_connection_t *connection; - xcb_screen_t *xcb_screen; + xcb_screen_t *xcb_screen; + xcb_render_sub_pixel_t subpixel_order; xcb_gcontext_t gc[GC_CACHE_SIZE]; uint8_t gc_depths[GC_CACHE_SIZE]; @@ -223,6 +224,7 @@ struct _cairo_xcb_connection { const xcb_setup_t *root; const xcb_query_extension_reply_t *render; const xcb_query_extension_reply_t *shm; + xcb_render_sub_pixel_t *subpixel_orders; cairo_list_t free_xids; cairo_freepool_t xid_pool; |