summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-04-03 15:46:21 +0200
committerAlexander Larsson <alexl@redhat.com>2013-04-03 15:58:40 +0200
commitb7a1561fef74144162613eb36978e5b7cb67a545 (patch)
treec870c43a779161cf9d59e5eb1e5b9139649f05df
parenta60ddd9a02e8eafcaed5d1b539f13e511b70a55e (diff)
downloadgtk+-b7a1561fef74144162613eb36978e5b7cb67a545.tar.gz
broadway: destroy old surface before creating new one
We were not using the old one anyway, and this may in some cases use less memory (although in most cases the server has a ref to the surface anyway).
-rw-r--r--gdk/broadway/gdkwindow-broadway.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c
index 103f09187b..3784b5a57c 100644
--- a/gdk/broadway/gdkwindow-broadway.c
+++ b/gdk/broadway/gdkwindow-broadway.c
@@ -271,16 +271,13 @@ void
_gdk_broadway_window_resize_surface (GdkWindow *window)
{
GdkWindowImplBroadway *impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
- cairo_surface_t *old;
if (impl->surface)
{
- old = impl->surface;
+ cairo_surface_destroy (impl->surface);
impl->surface = _gdk_broadway_server_create_surface (gdk_window_get_width (impl->wrapper),
gdk_window_get_height (impl->wrapper));
-
- cairo_surface_destroy (old);
}
if (impl->ref_surface)