diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-28 16:54:10 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-30 17:52:14 +0000 |
commit | cd45258c5bf6a06f7bd3f2bfaf928e423a9b70e1 (patch) | |
tree | aef32bbf14200c8c1861bb58a35c964f43b8ae1d /src/cairo-xlib-screen.c | |
parent | d384f864992fbf7513446a70158135a08e704678 (diff) |
[xlib] Only clear the GC clip mask as necessary.
Avoid redundant calls to XSetClipMask() for clean GCs.
Diffstat (limited to 'src/cairo-xlib-screen.c')
-rw-r--r-- | src/cairo-xlib-screen.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c index 65d131c0..9dd411ed 100644 --- a/src/cairo-xlib-screen.c +++ b/src/cairo-xlib-screen.c @@ -57,6 +57,8 @@ #include "cairo-xlib-private.h" #include "cairo-xlib-xrender-private.h" +#include "cairo-xlib-surface-private.h" + #include <fontconfig/fontconfig.h> static int @@ -404,7 +406,9 @@ depth_to_index (int depth) } GC -_cairo_xlib_screen_get_gc (cairo_xlib_screen_info_t *info, int depth) +_cairo_xlib_screen_get_gc (cairo_xlib_screen_info_t *info, + int depth, + unsigned int *dirty) { GC gc; cairo_bool_t needs_reset; @@ -419,7 +423,7 @@ _cairo_xlib_screen_get_gc (cairo_xlib_screen_info_t *info, int depth) CAIRO_MUTEX_UNLOCK (info->mutex); if (needs_reset) - XSetClipMask(info->display->display, gc, None); + *dirty |= CAIRO_XLIB_SURFACE_CLIP_DIRTY_GC; return gc; } |