diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-06 10:03:36 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-06 10:03:36 +0100 |
commit | 20d75bdadc897be238ceb4d2d02f079e469144e4 (patch) | |
tree | a92d3278e1ab66df3caf7d1286ffedffbf6f4c9d | |
parent | 9e0b716ecf1b27d74e63f25a055d8120d8d53309 (diff) |
xlib: Remove screen->has_render
Use the info from the display instead.
-rw-r--r-- | src/cairo-xlib-private.h | 1 | ||||
-rw-r--r-- | src/cairo-xlib-screen.c | 17 |
2 files changed, 4 insertions, 14 deletions
diff --git a/src/cairo-xlib-private.h b/src/cairo-xlib-private.h index e7ee59d9..2f27ae87 100644 --- a/src/cairo-xlib-private.h +++ b/src/cairo-xlib-private.h @@ -101,7 +101,6 @@ struct _cairo_xlib_screen { cairo_device_t *device; Screen *screen; - cairo_bool_t has_render; cairo_bool_t has_font_options; cairo_font_options_t font_options; diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c index 7f96a075..500fc9e6 100644 --- a/src/cairo-xlib-screen.c +++ b/src/cairo-xlib-screen.c @@ -167,16 +167,16 @@ _cairo_xlib_init_screen_font_options (Display *dpy, if (!get_integer_default (dpy, "rgba", &xft_rgba)) { + cairo_xlib_display_t *display = (cairo_xlib_display_t *) info->device; + xft_rgba = FC_RGBA_UNKNOWN; #if RENDER_MAJOR > 0 || RENDER_MINOR >= 6 - if (info->has_render) - { + if (display->render_major > 0 || display->render_minor >= 6) { int render_order = XRenderQuerySubpixelOrder (dpy, XScreenNumberOfScreen (info->screen)); - switch (render_order) - { + switch (render_order) { default: case SubPixelUnknown: xft_rgba = FC_RGBA_UNKNOWN; @@ -350,7 +350,6 @@ _cairo_xlib_screen_get (Display *dpy, CAIRO_REFERENCE_COUNT_INIT (&info->ref_count, 2); /* Add one for display cache */ info->device = device; info->screen = screen; - info->has_render = FALSE; info->has_font_options = FALSE; info->gc_depths = 0; memset (info->gc, 0, sizeof (info->gc)); @@ -358,14 +357,6 @@ _cairo_xlib_screen_get (Display *dpy, _cairo_array_init (&info->visuals, sizeof (cairo_xlib_visual_info_t*)); - if (screen) { - int event_base, error_base; - - info->has_render = - XRenderQueryExtension (dpy, &event_base, &error_base) && - (XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0); - } - _cairo_xlib_display_add_screen (display, info); *out = info; |