[cairo-commit] 2 commits - src/cairo-xlib-surface.c
Uli Schlachter
psychon at kemper.freedesktop.org
Tue Mar 7 12:40:57 UTC 2017
src/cairo-xlib-surface.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 10e4103a508f81a3e47938e97c0b84f1ba41071c
Author: Uli Schlachter <psychon at znc.in>
Date: Tue Mar 7 10:05:43 2017 +0100
xlib: Call XSync() before ignoring errors
The code here wants to ignore errors for a specific request. To do so,
it sets a no-op error handler. However, it could happen that some
previous request caused an error and this error will also be ignored by
the no-op error handler.
To avoid this, call XSync() before setting the error handler. This makes
sure that all pending errors are handled.
Signed-off-by: Uli Schlachter <psychon at znc.in>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 84e7c8e..908d76d 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -787,6 +787,7 @@ _get_image_surface (cairo_xlib_surface_t *surface,
_cairo_xlib_shm_surface_get_ximage (&image->base, &shm_image);
+ XSync (display->display, False);
old_handler = XSetErrorHandler (_noop_error_handler);
success = XShmGetImage (display->display,
surface->drawable,
@@ -808,6 +809,7 @@ _get_image_surface (cairo_xlib_surface_t *surface,
if (surface->use_pixmap == 0) {
cairo_xlib_error_func_t old_handler;
+ XSync (display->display, False);
old_handler = XSetErrorHandler (_noop_error_handler);
ximage = XGetImage (display->display,
commit f02ee3d3cf4168b5468b6548fe8823e803650f53
Author: Uli Schlachter <psychon at znc.in>
Date: Tue Mar 7 09:57:55 2017 +0100
xlib: Remove unused variable
This constant seems to be unused since commit af9fbd176b145f042408ef
from 2011.
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 555c1fe..84e7c8e 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -189,12 +189,6 @@ _cairo_surface_is_xlib (cairo_surface_t *surface);
#define CAIRO_ASSUME_PIXMAP 20
-static const XTransform identity = { {
- { 1 << 16, 0x00000, 0x00000 },
- { 0x00000, 1 << 16, 0x00000 },
- { 0x00000, 0x00000, 1 << 16 },
-} };
-
static Visual *
_visual_for_xrender_format(Screen *screen,
XRenderPictFormat *xrender_format)
More information about the cairo-commit
mailing list