[PATCH] Re: Problem in miClipPictureSrc?

Kim Woelders kim at woelders.dk
Fri Oct 2 14:32:31 PDT 2009


On Fri, 02 Oct 2009 16:07:31 +0200, Soeren Sandmann <sandmann at daimi.au.dk>  
wrote:

> "Kim Woelders" <kim at woelders.dk> writes:
>
>> Commit 128cd03eecacc6d5c5903d59a11966dcf3697bf1 causes trouble with
>> clip  regions in the e16 WM composite manager (e.g. during fade-out).
>
> This marks the second recorded use of source clipping in the history
> of the Render extension.
>
>> The problems are fixed by attached patch. Not sure if this is the
>> proper  solution though...
>
> The intent of this code is to shift the client clip into destination
> coordinates, then clip against it. Translating by clipOrigin.x/y
> converts from region coordinates to source coordinates, and dx/dy is
> supposed to bring it into destination coordinates.
>
> The problem with the commit I think is that I was thinking of dx/dy as
> the amount the destination is shifted, when it actually is how much
> the source is shifted.
>
> If so, the real fix would be:
>
>> @@ -318,14 +318,14 @@ miClipPictureSrc (RegionPtr	pRegion,
>>  	Bool result;
>>  	
>>  	pixman_region_translate ( pPicture->clientClip,
>> -				  pPicture->clipOrigin.x - dx,
>> -				  pPicture->clipOrigin.y - dy);
>> +				  dx - pPicture->clipOrigin.x,
>> +				  dy - pPicture->clipOrigin.y);
>
> +                                 pPicture->clipOrigin.x + dx,
> +                                 pPicture->clipOrigin.y + dy,
>
> and a similar correction after the intersection.
>
Yes, that works too (presumably because pPicture->clipOrigin.x/y always =  
0 in my case).
New patch attached.

> I'd be interested in whether the same bug exists with the vesa driver
> (or another unaccelerated one).
>
I tried the vesa driver but get only a mostly black screen.

/Kim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .0001-render-Fix-clip-region-translation-in-miClipPictureS.patch.swp
Type: application/octet-stream
Size: 0 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091002/c1021930/attachment.obj 


More information about the xorg-devel mailing list