Mailing List Archive

r19460 - projects/haf/tags/clutter/clutter-withdelete/clutter/eglx
Author: gw
Date: 2009-10-19 19:16:39 +0300 (Mon, 19 Oct 2009)
New Revision: 19460

Modified:
projects/haf/tags/clutter/clutter-withdelete/clutter/eglx/clutter-eglx-texture-pixmap.c
Log:
patch from https://projects.maemo.org/bugzilla/show_bug.cgi?id=134230


Modified: projects/haf/tags/clutter/clutter-withdelete/clutter/eglx/clutter-eglx-texture-pixmap.c
===================================================================
--- projects/haf/tags/clutter/clutter-withdelete/clutter/eglx/clutter-eglx-texture-pixmap.c 2009-10-19 16:13:39 UTC (rev 19459)
+++ projects/haf/tags/clutter/clutter-withdelete/clutter/eglx/clutter-eglx-texture-pixmap.c 2009-10-19 16:16:39 UTC (rev 19460)
@@ -95,6 +95,8 @@

/* If the pixmap has changed, we'll want to try and recreate the surface */
gboolean pixmap_changed;
+
+ gboolean dispose_called;
};

void
@@ -180,6 +182,7 @@
priv->current_pixmap_depth = 0;
priv->current_pixmap_width = 0;
priv->current_pixmap_height = 0;
+ priv->dispose_called = FALSE;

if (_ext_check_done == FALSE)
{
@@ -211,10 +214,23 @@

priv = CLUTTER_EGLX_TEXTURE_PIXMAP (object)->priv;

+ /* this dispose handler is called twice because of how
+ * clutter_actor_destroy works */
+ if (priv->dispose_called)
+ return;
+
if (priv->egl_surface != EGL_NO_SURFACE)
clutter_eglx_texture_pixmap_surface_destroy(CLUTTER_ACTOR(object));

+ if (priv->texture_id)
+ {
+ glDeleteTextures (1, &priv->texture_id);
+ priv->texture_id = 0;
+ }
+
G_OBJECT_CLASS (clutter_eglx_texture_pixmap_parent_class)->dispose (object);
+
+ priv->dispose_called = TRUE;
}

static gboolean
@@ -362,6 +378,7 @@
g_debug ("%s: Unable to create cogl texture", __FUNCTION__);

glDeleteTextures (1, &priv->texture_id);
+ priv->texture_id = 0;

CLUTTER_NOTE (TEXTURE, "Falling back to X11 manual mechanism");
priv->use_fallback = TRUE;

_______________________________________________
maemo-commits mailing list
maemo-commits@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-commits