From e0bdbb437ee699d6f75df34494a6e290dc55aa39 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 30 Jun 2009 22:04:01 +0100 Subject: [PATCH] [xlib] Remove redundant checks for src_picture==None Before attempting to even set the attributes on the source Picture, we ensure that it exists. So remove the redundant safe-guards to do nothing if it doesn't exist. --- src/cairo-xlib-surface.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c index 99da0d59a..54cfd6304 100644 --- a/src/cairo-xlib-surface.c +++ b/src/cairo-xlib-surface.c @@ -834,8 +834,7 @@ _get_image_surface (cairo_xlib_surface_t *surface, static void _cairo_xlib_surface_ensure_src_picture (cairo_xlib_surface_t *surface) { - if (!surface->src_picture) - { + if (!surface->src_picture) { XRenderPictureAttributes pa; int mask = 0; @@ -1361,9 +1360,6 @@ _cairo_xlib_surface_set_matrix (cairo_xlib_surface_t *surface, { XTransform xtransform; - if (!surface->src_picture) - return CAIRO_STATUS_SUCCESS; - /* Casting between pixman_transform_t and XTransform is safe because * they happen to be the exact same type. */ @@ -1389,9 +1385,6 @@ _cairo_xlib_surface_set_filter (cairo_xlib_surface_t *surface, { const char *render_filter; - if (!surface->src_picture) - return CAIRO_STATUS_SUCCESS; - if (surface->filter == filter) return CAIRO_STATUS_SUCCESS; @@ -1443,9 +1436,6 @@ _cairo_xlib_surface_set_repeat (cairo_xlib_surface_t *surface, int repeat) XRenderPictureAttributes pa; unsigned long mask; - if (!surface->src_picture) - return; - if (surface->repeat == repeat) return;