[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: [PATCH 2/2] exa: fixup exaAssertNotDirty.
From: michel () daenzer ! net (Michel =?ISO-8859-1?Q?D=E4nzer?=)
Date: 2009-02-27 14:49:29
Message-ID: 1235746169.7646.107.camel () thor
[Download RAW message or body]
On Don, 2009-02-26 at 23:24 +0100, Maarten Maathuis wrote:
> - Do the right thing based on prepare access.
[...]
> diff --git a/exa/exa_migration.c b/exa/exa_migration.c
> index 9d0eda0..b6f192b 100644
> --- a/exa/exa_migration.c
> +++ b/exa/exa_migration.c
> @@ -566,7 +566,9 @@ exaAssertNotDirty (PixmapPtr pPixmap)
> src_pitch = pExaPixmap->fb_pitch;
> cpp = pPixmap->drawable.bitsPerPixel / 8;
>
> - ExaDoPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
> + if (!ExaDoPrepareAccess(&pPixmap->drawable, EXA_PREPARE_SRC))
> + goto skip;
> +
> while (nbox--) {
> int rowbytes;
>
> @@ -579,7 +581,7 @@ exaAssertNotDirty (PixmapPtr pPixmap)
> continue;
>
> rowbytes = (pBox->x2 - pBox->x1) * cpp;
> - src = pExaPixmap->fb_ptr + pBox->y1 * src_pitch + pBox->x1 * cpp;
> + src = (CARD8 *) pPixmap->devPrivate.ptr + pBox->y1 * src_pitch + pBox->x1 * cpp;
> dst = pExaPixmap->sys_ptr + pBox->y1 * dst_pitch + pBox->x1 * cpp;
>
> for (y = pBox->y1; y < pBox->y2;
> @@ -592,6 +594,8 @@ exaAssertNotDirty (PixmapPtr pPixmap)
> }
> }
> }
> +
> +skip:
> exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
You should probably also use the same trick as exaCopyDirty to make the
pixmap temporarily considered offscreen: set pExaPixmap->offscreen =
TRUE before PrepareAccess and restore it after FinishAccess. Without
that, pixmaps are never checked while they're not offscreen.
--
Earthling Michel D?nzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic