Bug #8226: Fixed SetPictureTransform()'s handling of the argument matrix.
It now recognizes scaled variants of the identity matrix, too.
This commit is contained in:
parent
2b357e9a2f
commit
fc30370d14
|
@ -1459,18 +1459,24 @@ SetPictureClipRegion (PicturePtr pPicture,
|
||||||
return result;
|
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
|
int
|
||||||
SetPictureTransform (PicturePtr pPicture,
|
SetPictureTransform (PicturePtr pPicture,
|
||||||
PictTransform *transform)
|
PictTransform *transform)
|
||||||
{
|
{
|
||||||
static const PictTransform identity = { {
|
if (transform && transformIsIdentity (transform))
|
||||||
{ xFixed1, 0x00000, 0x00000 },
|
|
||||||
{ 0x00000, xFixed1, 0x00000 },
|
|
||||||
{ 0x00000, 0x00000, xFixed1 },
|
|
||||||
} };
|
|
||||||
|
|
||||||
if (transform && memcmp (transform, &identity, sizeof (PictTransform)) == 0)
|
|
||||||
transform = 0;
|
transform = 0;
|
||||||
|
|
||||||
if (transform)
|
if (transform)
|
||||||
|
|
Loading…
Reference in New Issue