xserver: Branch 'master' - 2 commits
Michel Daenzer
daenzer at kemper.freedesktop.org
Thu Oct 18 08:46:14 PDT 2007
exa/exa_accel.c | 3 +++
exa/exa_migration.c | 3 +++
exa/exa_render.c | 17 +++++++++++++++--
3 files changed, 21 insertions(+), 2 deletions(-)
New commits:
commit ce50bfd3369686cfecee5a138bd84ef1107a249d
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Thu Oct 18 17:44:48 2007 +0200
EXA: Skip empty glyphs.
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 65e67d8..cc2f59d 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -1246,6 +1246,7 @@ exaGlyphs (CARD8 op,
y1 = y - glyph->info.y;
if (x1 >= pCmpDrw->width || y1 >= pCmpDrw->height ||
+ glyph->info.width == 0 || glyph->info.height == 0 ||
(x1 + glyph->info.width) <= 0 || (y1 + glyph->info.height) <= 0)
goto nextglyph;
commit 5d74416740de883b7ef0994afea4bbd4d3901be0
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Thu Oct 18 17:44:14 2007 +0200
EXA: Don't attempt to move in pixmaps that can't be accelerated.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12815 .
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 8bbf036..52cc5c4 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -152,6 +152,9 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
int bpp = pDrawable->bitsPerPixel;
Bool access_prepared = FALSE;
+ if (pExaPixmap->accel_blocked)
+ return FALSE;
+
/* Don't bother with under 8bpp, XYPixmaps. */
if (format != ZPixmap || bpp < 8)
return FALSE;
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 7968521..d69526b 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -299,6 +299,9 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate)
if (pPixmap->drawable.bitsPerPixel < 8)
return;
+ if (pExaPixmap->accel_blocked)
+ return;
+
if (pExaPixmap->area == NULL) {
pExaPixmap->area =
exaOffscreenAlloc (pScreen, pExaPixmap->fb_size,
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 2ad5304..65e67d8 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -247,10 +247,24 @@ exaTryDriverSolidFill(PicturePtr pSrc,
int nbox;
int dst_off_x, dst_off_y;
PixmapPtr pSrcPix, pDstPix;
+ ExaPixmapPrivPtr pSrcExaPix, pDstExaPix;
CARD32 pixel;
CARD16 red, green, blue, alpha;
ExaMigrationRec pixmaps[1];
+ pDstPix = exaGetDrawablePixmap (pDst->pDrawable);
+ pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
+
+ pSrcExaPix = ExaGetPixmapPriv(pSrcPix);
+ pDstExaPix = ExaGetPixmapPriv(pDstPix);
+
+ /* Check whether the accelerator can use these pixmaps.
+ */
+ if (pSrcExaPix->accel_blocked || pDstExaPix->accel_blocked)
+ {
+ return -1;
+ }
+
xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y;
xSrc += pSrc->pDrawable->x;
@@ -261,12 +275,10 @@ exaTryDriverSolidFill(PicturePtr pSrc,
width, height))
return 1;
- pDstPix = exaGetDrawablePixmap (pDst->pDrawable);
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y);
- pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
pixel = exaGetPixmapFirstPixel (pSrcPix);
pixmaps[0].as_dst = TRUE;
More information about the xorg-commit
mailing list