From 57b35adaed112520c3b3b2fbad13cf5a91cd6652 Mon Sep 17 00:00:00 2001 From: Søren Sandmann Pedersen Date: Wed, 9 Mar 2011 13:57:25 -0500 Subject: 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 Reviewed-by: Keith Packard Signed-off-by: Soren Sandmann --- fb/fbpict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fb') 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); -- cgit v1.2.3