[gtk+/wip/csd: 9/9] stash: reorder the destroy after attach of new buffer (?)
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/csd: 9/9] stash: reorder the destroy after attach of new buffer (?)
- Date: Fri, 27 Jul 2012 11:04:24 +0000 (UTC)
commit e6460595b93edcf20ec346a925a37a34aa867d8d
Author: Rob Bradford <rob linux intel com>
Date: Fri Jul 27 11:40:35 2012 +0100
stash: reorder the destroy after attach of new buffer (?)
gdk/wayland/gdkwindow-wayland.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index fad879e..74a37b5 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -322,6 +322,7 @@ gdk_wayland_window_attach_image (GdkWindow *window)
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandCairoSurfaceData *data;
int32_t server_width, server_height, dx, dy;
+ cairo_surface_t *old_server_surface = NULL;
if (GDK_WINDOW_DESTROYED (window))
return;
@@ -345,7 +346,7 @@ gdk_wayland_window_attach_image (GdkWindow *window)
server_width = data->width;
server_height = data->height;
- cairo_surface_destroy (impl->server_surface);
+ old_server_surface = impl->server_surface;
}
else
{
@@ -372,6 +373,9 @@ gdk_wayland_window_attach_image (GdkWindow *window)
/* Attach this new buffer to the surface */
wl_surface_attach (impl->surface, data->buffer, dx, dy);
+
+ if (old_server_surface)
+ cairo_surface_destroy (old_server_surface);
}
#ifdef GDK_WAYLAND_USE_EGL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]