shaped-texture: Use a double when calculating clip

For x defined below, x == -INT32_MAX assuming that the arithmetic
expression actually uses the fpu.

float f = 1.0f;
int32_t x = INT32_MAX * f;

This would result in the calculated clip width/height to be -INT_MAX
if the damage width/height is INT_MAX. To solve this, use a double
variable instead.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
This commit is contained in:
Jonas Ådahl 2014-01-12 19:36:28 +01:00 committed by Jasper St. Pierre
parent 1d61a0f9b5
commit be698b597b

View File

@ -605,8 +605,8 @@ get_clip (MetaShapedTexture *stex,
ClutterActor *self = CLUTTER_ACTOR (stex);
MetaShapedTexturePrivate *priv;
ClutterActorBox allocation;
float scale_x;
float scale_y;
double scale_x;
double scale_y;
/* NB: clutter_actor_queue_redraw_with_clip expects a box in the actor's
* coordinate space so we need to convert from surface coordinates to