From 2db2de021f3745b0abd62feb7b3795ec07658ab8 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 28 Dec 2007 15:34:24 +0000 Subject: [PATCH] 2007-12-28 Emmanuele Bassi * clutter/clutter-texture.c: (clutter_texture_unrealize): Do not read the pixels back if the texture is being destroyed --- ChangeLog | 6 ++++++ clutter/clutter-texture.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7a639fc06..06712bacc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-12-28 Emmanuele Bassi + + * clutter/clutter-texture.c: + (clutter_texture_unrealize): Do not read the pixels back if the + texture is being destroyed + 2007-12-28 Emmanuele Bassi * clutter/clutter-model.c: diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c index 37c43b3ea..fb771c016 100644 --- a/clutter/clutter-texture.c +++ b/clutter/clutter-texture.c @@ -629,6 +629,13 @@ clutter_texture_unrealize (ClutterActor *actor) if (priv->tiles == NULL) return; + /* there's no need to read the pixels back when unrealizing inside + * a dispose run, and the dispose() call will release the GL + * texture data as well, so we can safely bail out now + */ + if (CLUTTER_PRIVATE_FLAGS (actor) & CLUTTER_ACTOR_IN_DESTRUCTION) + return; + CLUTTER_MARK(); if (clutter_feature_available (CLUTTER_FEATURE_TEXTURE_READ_PIXELS))