On Fri, Oct 02, 2009 at 11:46:27PM +0200, Kim Woelders wrote: > On Fri, 02 Oct 2009 23:32:31 +0200, Kim Woelders <[email protected]> wrote: > >> On Fri, 02 Oct 2009 16:07:31 +0200, Soeren Sandmann >> <[email protected]> >> wrote: >> >>> "Kim Woelders" <[email protected]> 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. >> > ... this time with patch... > > /Kim
> From 0c3a4dd64f7b421a7724eea1d3549dc484b31c61 Mon Sep 17 00:00:00 2001 > From: Kim Woelders <[email protected]> > Date: Fri, 2 Oct 2009 19:31:15 +0200 > Subject: [PATCH] render: Fix clip region translation in miClipPictureSrc(). > > > Signed-off-by: Kim Woelders <[email protected]> > --- > render/mipict.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/render/mipict.c b/render/mipict.c > index 71f3de7..b5dfcb2 100644 > --- a/render/mipict.c > +++ b/render/mipict.c > @@ -318,14 +318,14 @@ miClipPictureSrc (RegionPtr pRegion, > Bool result; > > pixman_region_translate ( pPicture->clientClip, > - pPicture->clipOrigin.x - dx, > - pPicture->clipOrigin.y - dy); > + pPicture->clipOrigin.x + dx, > + pPicture->clipOrigin.y + dy); > > result = REGION_INTERSECT (pScreen, pRegion, pRegion, > pPicture->clientClip); > > pixman_region_translate ( pPicture->clientClip, > - - (pPicture->clipOrigin.x - dx), > - - (pPicture->clipOrigin.y - dy)); > + - (pPicture->clipOrigin.x + dx), > + - (pPicture->clipOrigin.y + dy)); > > if (!result) > return FALSE; > -- > 1.6.5.rc2 > Thanks, merged into git://people.freedesktop.org/~whot/xserver.git. Cheers, Peter _______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
