[PATCH] Bug #25136: Revert "Fix clipping when windows are used as sources"

Keith Packard keithp at keithp.com
Wed Dec 2 16:01:39 PST 2009


On 01 Dec 2009 12:18:06 +0100, Soeren Sandmann <sandmann at daimi.au.dk> wrote:

> There is not a one-to-one correspondence between pixmaps and pixman
> images. Without the copying, a pixman image that points exactly at the
> window bits is created. If some of those bits don't exist, then the
> pixman image will contain bits that don't exist.

Ah. It's all quite clear now. And, I think I've found the root of the issue:

    bits = (FbBits*)((CARD8*)bits +
		     (pict->pDrawable->y + yoff) * stride * sizeof(FbBits) +
		     (pict->pDrawable->x + xoff) * (bpp / 8));

You can't do that. bpp may be 1 or 4, or the underlying machine may not
accept 32-bit accesses on non-32-bit aligned addresses.

The essential issue is that fb always translates coordinates into the
pixmap coordinate space and operates on them there. Bringing the
composite code back in line with this design will make everything work,
and you won't access things out of bounds.

I've got a simple patch which maps pixmaps directly to pixman images and
adjusts the transform and coordinates instead; I'll post those as a
follow-up to this message.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091202/caeca1e9/attachment.pgp 


More information about the xorg-devel mailing list