summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2011-07-08 21:31:47 +0200
committerUli Schlachter <psychon@znc.in>2011-07-09 09:42:22 +0200
commit508990af8d83c83ae6ea0c3e66bd736d3446027d (patch)
treea0fad5fe38ab67f29476dd52f0e4ea35db8aa750
parent5b8c01ec777538a110c5dc79fee04294b29f9721 (diff)
xcb: Don't use xcb surfaces as snapshots
Eventually someone might try to paint to the xcb surface again. However, _cairo_surface_begin_modification doesn't like that: cairo-surface.c:385: _cairo_surface_begin_modification: Assertion `surface->snapshot_of == ((void *)0)' failed. There was only a single place in the xcb backend where a cairo_xcb_surface_t could be used as a snapshot, so the _cairo_surface_has_snapshot that checked for such a surface can be removed, too. This does *not* remove all snapshots from the xcb backend, but all the remaining snapshots are instances of cairo_xcb_picture_t. These surfaces are only ever created internally and thus can't be modified by users directly. Fixes: xcb-snapshot-assert Signed-off-by: Uli Schlachter <psychon@znc.in>
-rw-r--r--src/cairo-xcb-surface-render.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index e8d6c52d..4f4b1dc9 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1016,17 +1016,6 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target,
cairo_xcb_picture_t *picture;
cairo_filter_t filter;
- {
- cairo_xcb_surface_t *snapshot;
-
- snapshot = (cairo_xcb_surface_t *)
- _cairo_surface_has_snapshot (source, &_cairo_xcb_surface_backend);
- if (snapshot != NULL) {
- if (snapshot->screen == target->screen)
- source = &snapshot->base;
- }
- }
-
picture = (cairo_xcb_picture_t *)
_cairo_surface_has_snapshot (source, &_cairo_xcb_picture_backend);
if (picture != NULL) {
@@ -2533,17 +2522,6 @@ _upload_image_inplace (cairo_xcb_surface_t *surface,
return CAIRO_INT_STATUS_UNSUPPORTED;
{
- cairo_xcb_surface_t *snapshot;
-
- snapshot = (cairo_xcb_surface_t *)
- _cairo_surface_has_snapshot (pattern->surface, &_cairo_xcb_surface_backend);
- if (snapshot != NULL) {
- if (snapshot->screen == surface->screen)
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
- }
-
- {
cairo_xcb_picture_t *snapshot;
snapshot = (cairo_xcb_picture_t *)
@@ -2609,12 +2587,6 @@ _upload_image_inplace (cairo_xcb_surface_t *surface,
_cairo_xcb_screen_put_gc (surface->screen, image->depth, gc);
_cairo_xcb_connection_release (surface->connection);
- if (surface->width == image->width && surface->height == image->height &&
- extents->width == image->width && extents->height == image->height)
- {
- _cairo_surface_attach_snapshot (&image->base, &surface->base, NULL);
- }
-
return CAIRO_STATUS_SUCCESS;
}