From d704e2e331acbfa65486e67437902ca834f9c076 Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Mon, 28 May 2007 20:09:19 +0000 Subject: [PATCH] 2007-05-28 Matthew Allum * clutter/clutter-texture.c: (clutter_texture_unrealize): Dont even try to move texture pixels from video -> system ram on unrealisation for GL/ES --- ChangeLog | 6 ++++++ clutter/clutter-texture.c | 16 +++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3493503..6b2c54d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-05-28 Matthew Allum + * clutter/clutter-texture.c: (clutter_texture_unrealize): + Dont even try to move texture pixels from video -> system + ram on unrealisation for GL/ES + +2007-05-28 Matthew Allum + * clutter/clutter-stage.c: (clutter_stage_get_actor_at_pos): Fix for GL/ES. Barring texture reads this means all clutter functionality now works on GL/ES! (no doubt with a few yet to diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c index c68a2fc..959c991 100644 --- a/clutter/clutter-texture.c +++ b/clutter/clutter-texture.c @@ -561,12 +561,18 @@ clutter_texture_unrealize (ClutterActor *actor) CLUTTER_MARK(); - /* Move image data from video to main memory - */ - if (priv->local_pixbuf == NULL) - priv->local_pixbuf = clutter_texture_get_pixbuf (texture); + if (clutter_feature_available (CLUTTER_FEATURE_TEXTURE_READ_PIXELS)) + { + /* Move image data from video to main memory. + * GL/ES cant do this - it probably makes sense + * to move this kind of thing into a ClutterProxyTexture + * where this behaviour can be better controlled. + */ + if (priv->local_pixbuf == NULL) + priv->local_pixbuf = clutter_texture_get_pixbuf (texture); - texture_free_gl_resources (texture); + texture_free_gl_resources (texture); + } CLUTTER_NOTE (TEXTURE, "Texture unrealized"); } -- 2.7.4