[cairo-commit] 2 commits - src/cairo-xcb-connection.c src/cairo-xcb-private.h src/cairo-xlib-xcb-surface.c
Uli Schlachter
psychon at kemper.freedesktop.org
Fri Jul 1 01:34:07 PDT 2011
src/cairo-xcb-connection.c | 6 ++++++
src/cairo-xcb-private.h | 2 ++
src/cairo-xlib-xcb-surface.c | 14 ++++++++++++++
3 files changed, 22 insertions(+)
New commits:
commit 59fadcf7d93a179554a3f615c02e48547d6b141e
Author: Uli Schlachter <psychon at znc.in>
Date: Fri Jul 1 10:26:28 2011 +0200
xlib-xcb: Fix api-special-cases test
The functions cairo_xlib_surface_set_size and cairo_xlib_surface_set_drawable
didn't set the expected error when called with a finished surface.
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xlib-xcb-surface.c b/src/cairo-xlib-xcb-surface.c
index 868844b..16fabd8 100644
--- a/src/cairo-xlib-xcb-surface.c
+++ b/src/cairo-xlib-xcb-surface.c
@@ -418,6 +418,11 @@ cairo_xlib_surface_set_size (cairo_surface_t *abstract_surface,
if (unlikely (abstract_surface->status))
return;
+ if (unlikely (abstract_surface->finished)) {
+ status = _cairo_surface_set_error (abstract_surface,
+ _cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
+ return;
+ }
if (surface->base.type != CAIRO_SURFACE_TYPE_XLIB) {
status = _cairo_surface_set_error (abstract_surface,
@@ -426,6 +431,10 @@ cairo_xlib_surface_set_size (cairo_surface_t *abstract_surface,
}
cairo_xcb_surface_set_size (&surface->xcb->base, width, height);
+ if (unlikely (surface->xcb->base.status)) {
+ status = _cairo_surface_set_error (abstract_surface,
+ _cairo_error (surface->xcb->base.status));
+ }
}
void
@@ -439,6 +448,11 @@ cairo_xlib_surface_set_drawable (cairo_surface_t *abstract_surface,
if (unlikely (abstract_surface->status))
return;
+ if (unlikely (abstract_surface->finished)) {
+ status = _cairo_surface_set_error (abstract_surface,
+ _cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
+ return;
+ }
if (surface->base.type != CAIRO_SURFACE_TYPE_XLIB) {
status = _cairo_surface_set_error (abstract_surface,
commit 4495e08e9e5fbcd386bf398097c8276f7f5c862d
Author: Uli Schlachter <psychon at znc.in>
Date: Fri Jul 1 10:12:15 2011 +0200
xlib-xcb: Use slim_hidden_proto correctly
There are debug functions for setting the precision on a xlib device, so
xlib-xcb must redirect that to the xcb backend, too. However this means that
these public functions now are also called internally, thus we have to make them
go through the slim_hidden_* macros.
This commit fixes the following error from "make check":
Checking .libs/libcairo.so for local PLT entries
00000000002bb6d8 000001e300000007 R_X86_64_JUMP_SLOT 000000000006d8a0 cairo_xcb_device_debug_set_precision + 0
00000000002bb750 0000025e00000007 R_X86_64_JUMP_SLOT 000000000006d8b0 cairo_xcb_device_debug_get_precision + 0
FAIL: check-plt.sh
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xcb-connection.c b/src/cairo-xcb-connection.c
index 0c3bd5a..de1bb17 100644
--- a/src/cairo-xcb-connection.c
+++ b/src/cairo-xcb-connection.c
@@ -910,6 +910,9 @@ cairo_xcb_device_debug_set_precision (cairo_device_t *device,
((cairo_xcb_connection_t *) device)->force_precision = precision;
}
+#if CAIRO_HAS_XLIB_XCB_FUNCTIONS
+slim_hidden_def (cairo_xcb_device_debug_set_precision);
+#endif
int
cairo_xcb_device_debug_get_precision (cairo_device_t *device)
@@ -919,3 +922,6 @@ cairo_xcb_device_debug_get_precision (cairo_device_t *device)
return ((cairo_xcb_connection_t *) device)->force_precision;
}
+#if CAIRO_HAS_XLIB_XCB_FUNCTIONS
+slim_hidden_def (cairo_xcb_device_debug_get_precision);
+#endif
diff --git a/src/cairo-xcb-private.h b/src/cairo-xcb-private.h
index 4704a25..45b7bbe 100644
--- a/src/cairo-xcb-private.h
+++ b/src/cairo-xcb-private.h
@@ -760,6 +760,8 @@ slim_hidden_proto (cairo_xcb_surface_create);
slim_hidden_proto (cairo_xcb_surface_create_for_bitmap);
slim_hidden_proto (cairo_xcb_surface_create_with_xrender_format);
slim_hidden_proto (cairo_xcb_surface_set_size);
+slim_hidden_proto (cairo_xcb_device_debug_get_precision);
+slim_hidden_proto_no_warn (cairo_xcb_device_debug_set_precision);
#endif
#endif /* CAIRO_XCB_PRIVATE_H */
More information about the cairo-commit
mailing list