summaryrefslogtreecommitdiff
path: root/exa/exa_render.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-10-19 15:44:17 -0700
committerEric Anholt <eric@anholt.net>2007-10-19 15:44:17 -0700
commita3a95d3475dc91ed2e8a55bf484a6b3f2b5ac32a (patch)
tree8ad023078041200816ec76c4d83d04fd46799655 /exa/exa_render.c
parenta358b87f45ce75e5d013fc904a07dfe394f74387 (diff)
parent7e1cada6c6b9fa41ef3ead00bf7725d626dda193 (diff)
Merge branch 'master' into glyph-pixmaps
Conflicts: configure.ac
Diffstat (limited to 'exa/exa_render.c')
-rw-r--r--exa/exa_render.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 98fc884b6..847a36182 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, &region, dst_off_x, dst_off_y);
- pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
pixel = exaGetPixmapFirstPixel (pSrcPix);
pixmaps[0].as_dst = TRUE;
@@ -1202,6 +1214,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;