xserver: Branch 'server-1.2-branch' - 2 commits
Tilman Sauerbeck
tilman at kemper.freedesktop.org
Sat Oct 7 00:46:00 EEST 2006
render/picture.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
New commits:
diff-tree a2d528068fc0446e441d7116359f314a211ae004 (from dce3f2a9ce1742bd21794d5eea86ebbd27fa4b62)
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date: Tue Sep 12 01:15:40 2006 +0200
transformIsIdentity() now doesn't accept a zero matrix as the identity.
Added a non-zero test for one of the diagonal values.
(cherry picked from 594d4019c613b0f4bf8f48cc074ecc3c8366f1d7 commit)
diff --git a/render/picture.c b/render/picture.c
index a9910ab..a3443c2 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -1464,6 +1464,7 @@ transformIsIdentity(PictTransform *t)
{
return ((t->matrix[0][0] == t->matrix[1][1]) &&
(t->matrix[0][0] == t->matrix[2][2]) &&
+ (t->matrix[0][0] != 0) &&
(t->matrix[0][1] == 0) &&
(t->matrix[0][2] == 0) &&
(t->matrix[1][0] == 0) &&
diff-tree dce3f2a9ce1742bd21794d5eea86ebbd27fa4b62 (from 8a27eed995ad247a921035a70fc0df2142a86078)
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date: Mon Sep 11 19:43:09 2006 +0200
Bug #8226: Fixed SetPictureTransform()'s handling of the argument matrix.
It now recognizes scaled variants of the identity matrix, too.
(cherry picked from fc30370d14125f86ee1192890a184881fa139546 commit)
diff --git a/render/picture.c b/render/picture.c
index 566d91e..a9910ab 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -1459,18 +1459,24 @@ SetPictureClipRegion (PicturePtr pPic
return result;
}
+static Bool
+transformIsIdentity(PictTransform *t)
+{
+ return ((t->matrix[0][0] == t->matrix[1][1]) &&
+ (t->matrix[0][0] == t->matrix[2][2]) &&
+ (t->matrix[0][1] == 0) &&
+ (t->matrix[0][2] == 0) &&
+ (t->matrix[1][0] == 0) &&
+ (t->matrix[1][2] == 0) &&
+ (t->matrix[2][0] == 0) &&
+ (t->matrix[2][1] == 0));
+}
int
SetPictureTransform (PicturePtr pPicture,
PictTransform *transform)
{
- static const PictTransform identity = { {
- { xFixed1, 0x00000, 0x00000 },
- { 0x00000, xFixed1, 0x00000 },
- { 0x00000, 0x00000, xFixed1 },
- } };
-
- if (transform && memcmp (transform, &identity, sizeof (PictTransform)) == 0)
+ if (transform && transformIsIdentity (transform))
transform = 0;
if (transform)
More information about the xorg-commit
mailing list