diff --git a/ChangeLog b/ChangeLog index 8b56e0b0c..fb1294480 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-07-23 Matthew Allum + + * clutter/clutter-texture.c: (texture_render_to_gl_quad), + (clutter_texture_paint): + Dont be over aggressive in throwing criticals for unrealized + textures. Doesn't make sense for sub classes. (#403) + 2007-07-22 Emmanuele Bassi Two small fixes for correctly debugging the deinitialisation diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c index 61b68cb6b..83734b8e4 100644 --- a/clutter/clutter-texture.c +++ b/clutter/clutter-texture.c @@ -303,11 +303,6 @@ texture_render_to_gl_quad (ClutterTexture *texture, qwidth = x2-x1; qheight = y2-y1; - if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR(texture))) - clutter_actor_realize (CLUTTER_ACTOR(texture)); - - g_return_if_fail(priv->tiles != NULL); - if (!priv->is_tiled) { cogl_texture_bind (priv->target_type, priv->tiles[0]); @@ -703,6 +698,23 @@ clutter_texture_paint (ClutterActor *self) gint x1, y1, x2, y2; ClutterColor col = { 0xff, 0xff, 0xff, 0xff }; + if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR(texture))) + clutter_actor_realize (CLUTTER_ACTOR(texture)); + + if (texture->priv->tiles == NULL) + { + /* We just need do debug this state, it doesn't really need to + * throw a an error as what previously happened. Sub classes + * quite likely may not be able to realize. + */ + CLUTTER_NOTE (PAINT, + "unable to paint texture '%s', contains no tiles", + clutter_actor_get_name (self) + ? clutter_actor_get_name (self) + : "unknown"); + return; + } + CLUTTER_NOTE (PAINT, "painting texture '%s'", clutter_actor_get_name (self) ? clutter_actor_get_name (self)