summaryrefslogtreecommitdiff
path: root/src/cairo-xcb-surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-xcb-surface.c')
-rw-r--r--[-rwxr-xr-x]src/cairo-xcb-surface.c41
1 files changed, 17 insertions, 24 deletions
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 7b74027d1..41e16f0db 100755..100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -383,13 +383,10 @@ _get_image (cairo_xcb_surface_t *surface,
}
}
- status = _cairo_xcb_connection_get_image (connection,
- surface->drawable,
- x, y,
- width, height,
- &reply);
- if (unlikely (status))
- goto FAIL;
+ reply =_cairo_xcb_connection_get_image (connection,
+ surface->drawable,
+ x, y,
+ width, height);
if (reply == NULL && ! surface->owns_pixmap) {
/* xcb_get_image_t from a window is dangerous because it can
@@ -423,15 +420,11 @@ _get_image (cairo_xcb_surface_t *surface,
_cairo_xcb_screen_put_gc (surface->screen, surface->depth, gc);
- status = _cairo_xcb_connection_get_image (connection,
- pixmap,
- 0, 0,
- width, height,
- &reply);
+ reply = _cairo_xcb_connection_get_image (connection,
+ pixmap,
+ 0, 0,
+ width, height);
_cairo_xcb_connection_free_pixmap (connection, pixmap);
-
- if (unlikely (status))
- goto FAIL;
}
if (unlikely (reply == NULL)) {
@@ -543,9 +536,9 @@ static void
_cairo_xcb_surface_get_font_options (void *abstract_surface,
cairo_font_options_t *options)
{
- /* XXX copy from xlib */
- _cairo_font_options_init_default (options);
- _cairo_font_options_set_round_glyph_positions (options, CAIRO_ROUND_GLYPH_POS_ON);
+ cairo_xcb_surface_t *surface = abstract_surface;
+
+ *options = *_cairo_xcb_screen_get_font_options (surface->screen);
}
static cairo_status_t
@@ -1163,8 +1156,8 @@ _cairo_xcb_surface_glyphs (void *abstract_surface,
if (shadow_type != CAIRO_SHADOW_INSET)
status = _cairo_surface_shadow_glyphs (surface, op, source,
- scaled_font,
- glyphs, num_glyphs,
+ scaled_font,
+ glyphs, num_glyphs,
clip,
&source->shadow);
if (unlikely (status)) {
@@ -1190,8 +1183,8 @@ _cairo_xcb_surface_glyphs (void *abstract_surface,
if (shadow_type == CAIRO_SHADOW_INSET)
status = _cairo_surface_shadow_glyphs (surface, op, source,
- scaled_font,
- glyphs, num_glyphs,
+ scaled_font,
+ glyphs, num_glyphs,
clip,
&source->shadow);
cairo_device_release (surface->device);
@@ -1604,7 +1597,7 @@ cairo_xcb_surface_set_size (cairo_surface_t *abstract_surface,
}
- if (abstract_surface->type != CAIRO_SURFACE_TYPE_XCB) {
+ if ( !_cairo_surface_is_xcb(abstract_surface)) {
_cairo_surface_set_error (abstract_surface,
_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH));
return;
@@ -1658,7 +1651,7 @@ cairo_xcb_surface_set_drawable (cairo_surface_t *abstract_surface,
}
- if (abstract_surface->type != CAIRO_SURFACE_TYPE_XCB) {
+ if ( !_cairo_surface_is_xcb(abstract_surface)) {
_cairo_surface_set_error (abstract_surface,
_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH));
return;