diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-03-09 13:57:25 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2011-03-14 13:57:42 -0400 |
commit | 57b35adaed112520c3b3b2fbad13cf5a91cd6652 (patch) | |
tree | 7c8a394661c9e16010aa45cc0c34153e62961ec5 /fb/fbpict.c | |
parent | 016edc17512ba966d60edede8cf947996bae0b3c (diff) |
Remove geometry arguments from miSourceValidate()
The only user of the geometry coordinates is the software sprite code,
which uses them to remove the pointer whenever the window beneath is
being used as a source. However, using Window pictures as a source is
extremely rare (let alone *partial* windows), so there is no harm done
in just validating all of the drawable.
Additionally, the miSourceValidate() function was buggy in at least
three respects:
(a) It added drawable->{x,y} before calling down, which is wrong since
the misprite code already adds them in its check. (Alternatively,
the misprite code is wrong, but there are actual users who would
notice if that code was broken).
(b) It didn't account for the width of the interpolation filter, so if
the Picture had a bilinear or convolution filter, the edges
surrounding the source area would not be validated.
(c) It didn't validate alpha maps.
Finally, computing the bounding box of the transform on every
composite request was a real performance issue in pixman, so
presumably it could be one here as well.
This patch changes miSourceValidate() to simply validate all of the
underlying drawable.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Soren Sandmann <ssp@redhat.com>
Diffstat (limited to 'fb/fbpict.c')
-rw-r--r-- | fb/fbpict.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fb/fbpict.c b/fb/fbpict.c index 312f3df21..133f4226c 100644 --- a/fb/fbpict.c +++ b/fb/fbpict.c @@ -54,9 +54,9 @@ fbComposite (CARD8 op, int msk_xoff, msk_yoff; int dst_xoff, dst_yoff; - miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height); + miCompositeSourceValidate (pSrc); if (pMask) - miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height); + miCompositeSourceValidate (pMask); src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff); mask = image_from_pict (pMask, FALSE, &msk_xoff, &msk_yoff); |