mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c: (clutter_texture_unrealize), (clutter_texture_dispose): Add a guard against reading back memory during the unrealization on dispose.
This commit is contained in:
parent
e3de3f196b
commit
76b71f8cc4
@ -1,3 +1,10 @@
|
||||
2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-texture.c:
|
||||
(clutter_texture_unrealize), (clutter_texture_dispose): Add a
|
||||
guard against reading back memory during the unrealization on
|
||||
dispose.
|
||||
|
||||
2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
Bug #953 - Actors are not hidden before unrealized or
|
||||
|
@ -93,6 +93,8 @@ struct _ClutterTexturePrivate
|
||||
guint local_data_rowstride;
|
||||
guint local_data_has_alpha;
|
||||
guchar *local_data;
|
||||
|
||||
guint in_dispose : 1;
|
||||
};
|
||||
|
||||
enum
|
||||
@ -213,7 +215,8 @@ clutter_texture_unrealize (ClutterActor *actor)
|
||||
* 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)
|
||||
if ((CLUTTER_PRIVATE_FLAGS (actor) & CLUTTER_ACTOR_IN_DESTRUCTION) ||
|
||||
priv->in_dispose)
|
||||
return;
|
||||
|
||||
CLUTTER_MARK();
|
||||
@ -466,6 +469,14 @@ clutter_texture_dispose (GObject *object)
|
||||
|
||||
priv = texture->priv;
|
||||
|
||||
/* mark that we are in dispose, so when the parent class'
|
||||
* dispose implementation will call unrealize on us we'll
|
||||
* not try to copy back the resources from video memory
|
||||
* to system memory
|
||||
*/
|
||||
if (!priv->in_dispose)
|
||||
priv->in_dispose = TRUE;
|
||||
|
||||
texture_free_gl_resources (texture);
|
||||
texture_fbo_free_resources (texture);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user