[Intel-gfx] [PATCH] accessing a pixmap if prepare_access fails is verboten.
Jesse Barnes
jbarnes at virtuousgeek.org
Fri Jul 17 18:17:05 CEST 2009
On Thu, 16 Jul 2009 20:38:43 +0100
Owain Ainsworth <zerooa at googlemail.com> wrote:
> From 4f0b889dc7dc07d941d60f7be302366ec35566cb Mon Sep 17 00:00:00 2001
> From: Owain G. Ainsworth <oga at openbsd.org>
> Date: Thu, 16 Jul 2009 20:31:46 +0100
> Subject: [PATCH] accessing a pixmap if prepare_access fails is
> verboten.
>
> Don't do it, treat this the same as every other prepare access call
> in uxa. ---
> uxa/uxa.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/uxa/uxa.c b/uxa/uxa.c
> index 1f2d75b..22c7c40 100644
> --- a/uxa/uxa.c
> +++ b/uxa/uxa.c
> @@ -244,9 +244,10 @@ uxa_validate_gc (GCPtr pGC, unsigned long
> changes, DrawablePtr pDrawable) /* We can't inline stipple handling
> like we do for GCTile because it sets
> * fbgc privates.
> */
> - uxa_prepare_access(&pGC->stipple->drawable, UXA_ACCESS_RW);
> - fbValidateGC (pGC, changes, pDrawable);
> - uxa_finish_access(&pGC->stipple->drawable);
> + if (uxa_prepare_access(&pGC->stipple->drawable,
> UXA_ACCESS_RW)) {
> + fbValidateGC (pGC, changes, pDrawable);
> + uxa_finish_access(&pGC->stipple->drawable);
> + }
> } else {
> fbValidateGC (pGC, changes, pDrawable);
> }
Seems like a good fix to me, Keith does it look ok to you?
--
Jesse Barnes, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list