diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-11-19 18:42:32 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-11-20 13:26:29 +0000 |
commit | 0f15b8b45bb6de10ce1926db303247a5bd3c1c08 (patch) | |
tree | 4f2231862a0fdbf7b6f973cc6ecdfd072e9f37ef /src/sna/sna_transform.c | |
parent | 7725c423cda217e0dbd95003bb7a80b4b3a73bb4 (diff) |
sna/transform: Correctly check for imprecise fractional translations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_transform.c')
-rw-r--r-- | src/sna/sna_transform.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sna/sna_transform.c b/src/sna/sna_transform.c index 3b54df48..b62b3238 100644 --- a/src/sna/sna_transform.c +++ b/src/sna/sna_transform.c @@ -135,14 +135,14 @@ sna_transform_is_imprecise_integer_translation(const PictTransform *t, int f; f = pixman_fixed_fraction(t->matrix[0][2]); - if (f < IntToxFixed(1)/4 || f > IntToxFixed(3)/4) { - DBG(("%s: imprecise, fractional translation X\n", __FUNCTION__)); + if (f > IntToxFixed(1)/4 && f < IntToxFixed(3)/4) { + DBG(("%s: imprecise, fractional translation X: %x\n", __FUNCTION__, f)); return false; } f = pixman_fixed_fraction(t->matrix[1][2]); - if (f < IntToxFixed(1)/4 || f > IntToxFixed(3)/4) { - DBG(("%s: imprecise, fractional translation Y\n", __FUNCTION__)); + if (f > IntToxFixed(1)/4 && f < IntToxFixed(3)/4) { + DBG(("%s: imprecise, fractional translation Y: %x\n", __FUNCTION__, f)); return false; } } |