[gtk/wip/matthiasc/shared-glyph-cache] Fix a refcounting mishap
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/shared-glyph-cache] Fix a refcounting mishap
- Date: Wed, 5 Jun 2019 02:50:14 +0000 (UTC)
commit e961943508c92277bd6ebf55fac8306eac3d1510
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jun 5 02:49:07 2019 +0000
Fix a refcounting mishap
We were missing a ref, causing caches to go missing
when a window is opened twice.
gsk/gl/gskglrenderer.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index ab7fcd1f01..9a3bd13e76 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -2522,11 +2522,11 @@ get_texture_atlases_for_display (GdkDisplay *display)
{
atlases = gsk_gl_texture_atlases_new ();
g_object_set_data_full (G_OBJECT (display), "gsk-gl-texture-atlases",
- gsk_gl_texture_atlases_ref (atlases),
+ atlases,
(GDestroyNotify) gsk_gl_texture_atlases_unref);
}
- return atlases;
+ return gsk_gl_texture_atlases_ref (atlases);
}
static GskGLGlyphCache *
@@ -2543,11 +2543,11 @@ get_glyph_cache_for_display (GdkDisplay *display,
{
glyph_cache = gsk_gl_glyph_cache_new (display, atlases);
g_object_set_data_full (G_OBJECT (display), "gsk-gl-glyph-cache",
- gsk_gl_glyph_cache_ref (glyph_cache),
+ glyph_cache,
(GDestroyNotify) gsk_gl_glyph_cache_unref);
}
- return glyph_cache;
+ return gsk_gl_glyph_cache_ref (glyph_cache);
}
static GskGLIconCache *
@@ -2564,11 +2564,11 @@ get_icon_cache_for_display (GdkDisplay *display,
{
icon_cache = gsk_gl_icon_cache_new (display, atlases);
g_object_set_data_full (G_OBJECT (display), "gsk-gl-icon-cache",
- gsk_gl_icon_cache_ref (icon_cache),
+ icon_cache,
(GDestroyNotify) gsk_gl_icon_cache_unref);
}
- return icon_cache;
+ return gsk_gl_icon_cache_ref (icon_cache);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]