diff options
author | Tilman Sauerbeck <tilman@code-monkey.de> | 2006-08-26 18:04:08 +0200 |
---|---|---|
committer | Tilman Sauerbeck <tilman@code-monkey.de> | 2006-08-26 18:04:08 +0200 |
commit | 4bf16b5f26266132f0c3e9c058df8014d52d56f1 (patch) | |
tree | 699309e33082f9883fe06091f78f3e2a18f665fb | |
parent | 5d001aeb21aabde5b6cd919692de726ebaeb3481 (diff) |
Clean up color/planemask replicating.
-rw-r--r-- | src/mga_exa.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mga_exa.c b/src/mga_exa.c index 9b0f01e..5a5c0d6 100644 --- a/src/mga_exa.c +++ b/src/mga_exa.c @@ -182,21 +182,18 @@ mgaPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg) PMGA(pPixmap); QUIESCE_DMA(pPixmap); - /* FIXME: taken from kdrive. Is this needed? Doesn't seem to affect - * rendering... - * - * We must pad planemask and fg depending on the format of the + /* We must pad planemask and fg depending on the format of the * destination pixmap */ switch (pPixmap->drawable.bitsPerPixel) { + case 8: + fg |= fg << 8; + planemask |= planemask << 8; + /* fall through */ case 16: fg |= fg << 16; planemask |= planemask << 16; break; - case 8: - fg |= (fg << 8) | (fg << 16) | (fg << 24); - planemask |= (planemask << 8) | (planemask << 16) | (planemask << 24); - break; } pMga->FilledRectCMD = MGADWG_TRAP | MGADWG_SOLID | MGADWG_ARZERO | |