summaryrefslogtreecommitdiff
path: root/src/cairo-xlib-screen.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-10-28 16:54:10 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-10-30 17:52:14 +0000
commitcd45258c5bf6a06f7bd3f2bfaf928e423a9b70e1 (patch)
treeaef32bbf14200c8c1861bb58a35c964f43b8ae1d /src/cairo-xlib-screen.c
parentd384f864992fbf7513446a70158135a08e704678 (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.c8
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;
}