[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.
This commit is contained in:
Chris Wilson 2009-06-30 22:04:01 +01:00
parent b7f68d3518
commit e0bdbb437e

View file

@ -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;