deform-effect: Use the FBO target size
authorEmmanuele Bassi <ebassi@linux.intel.com>
Sat, 19 Feb 2011 09:17:25 +0000 (09:17 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Sat, 19 Feb 2011 09:19:07 +0000 (09:19 +0000)
The ClutterDeformEffect sub-classes are effectively deforming the
texture target of an FBO, not the actor itself. Thus, we need to
use the FBO's size, and not the actor's allocated size, given that
the actor might be transformed prior to applying an effect.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2571

clutter/clutter-deform-effect.c

index f90e70a..9d6a7f3 100644 (file)
@@ -62,6 +62,7 @@
 
 #include "clutter-debug.h"
 #include "clutter-enum-types.h"
+#include "clutter-offscreen-effect-private.h"
 #include "clutter-private.h"
 
 #define DEFAULT_N_TILES         32
@@ -182,7 +183,9 @@ clutter_deform_effect_paint_target (ClutterOffscreenEffect *effect)
 
       actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (effect));
       opacity = clutter_actor_get_paint_opacity (actor);
-      clutter_actor_get_size (actor, &width, &height);
+
+      if (!_clutter_offscreen_effect_get_target_size (effect, &width, &height))
+        clutter_actor_get_size (actor, &width, &height);
 
       for (i = 0; i < priv->y_tiles + 1; i++)
         {