mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-08 16:30:27 +01:00
[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:
parent
b7f68d3518
commit
e0bdbb437e
1 changed files with 1 additions and 11 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue