diff options
author | Eric Anholt <anholt@freebsd.org> | 2006-03-14 20:38:06 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2006-03-14 20:38:06 +0000 |
commit | d30905478078036383977ae9d4a3685c2e2c642f (patch) | |
tree | 687cc2627532b3834ae56e6cf5696f68ae636be0 /exa/exa_accel.c | |
parent | 01aa209f2056ef04e3f2735756a0f8b4a67a3d87 (diff) |
Pull code for getting the (0,0) pixel from a pixmap out to a separate
function, since it gets repeated (with bad error handling, in one
case).
Diffstat (limited to 'exa/exa_accel.c')
-rw-r--r-- | exa/exa_accel.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 9d02ab990..ca3afc3ec 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -782,26 +782,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, * FillRegionSolid, saving numerous copies. */ if (tileWidth == 1 && tileHeight == 1) { - CARD32 pixel; - - exaDrawableUseMemory(&pTile->drawable); - exaPrepareAccess(&pTile->drawable, EXA_PREPARE_SRC); - switch (pTile->drawable.bitsPerPixel) { - case 8: - pixel = *(CARD8 *)(pTile->devPrivate.ptr); - break; - case 16: - pixel = *(CARD16 *)(pTile->devPrivate.ptr); - break; - case 32: - pixel = *(CARD32 *)(pTile->devPrivate.ptr); - break; - default: - exaFinishAccess(&pTile->drawable, EXA_PREPARE_SRC); - goto fallback; - } - exaFinishAccess(&pTile->drawable, EXA_PREPARE_SRC); - exaFillRegionSolid(pDrawable, pRegion, pixel); + exaFillRegionSolid(pDrawable, pRegion, exaGetPixmapFirstPixel (pTile)); return; } |