[mutter/wayland] shaped-texture: Use a double when calculating clip
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] shaped-texture: Use a double when calculating clip
- Date: Thu, 16 Jan 2014 18:28:30 +0000 (UTC)
commit be698b597b53527c3d873b293c9c12113bfb582d
Author: Jonas Ådahl <jadahl gmail com>
Date: Sun Jan 12 19:36:28 2014 +0100
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
src/compositor/meta-shaped-texture.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index b37770e..2939584 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]