From ba011dc77dcfaea2843481fbba45a76d8cb9aa83 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 4 Jul 2005 14:47:03 +0000 Subject: don't be too smart and try to replace PictOpOver by PictOpSrc when we have an external alpha map. Make fbmmx.c compile on gcc 4.0.1. --- fb/fbcompose.c | 5 +---- fb/fbmmx.c | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'fb') diff --git a/fb/fbcompose.c b/fb/fbcompose.c index 8a5a7e2f1..9ec696600 100644 --- a/fb/fbcompose.c +++ b/fb/fbcompose.c @@ -3220,9 +3220,6 @@ static void fbFetchExternalAlpha(PicturePtr pict, int x, int y, int width, CARD3 fbFetchTransformed(pict, x, y, width, buffer); fbFetchTransformed(pict->alphaMap, x - pict->alphaOrigin.x, y - pict->alphaOrigin.y, width, alpha_buffer); for (i = 0; i < width; ++i) { - /* XXX i absolutely hate the way i'm doing it right now. - there's definitely million better ways or handling - external alpha */ int a = alpha_buffer[i]>>24; buffer[i] = (a << 24) | (div_255(Red(buffer[i]) * a) << 16) @@ -3437,7 +3434,7 @@ fbCompositeGeneral (CARD8 op, maskRepeat = pMask->repeat == RepeatNormal && !pMask->transform && (pMask->pDrawable->width != 1 || pMask->pDrawable->height != 1); - if (op == PictOpOver && !pMask && !pSrc->transform && !PICT_FORMAT_A(pSrc->format)) + if (op == PictOpOver && !pMask && !pSrc->transform && !PICT_FORMAT_A(pSrc->format) && !pSrc->alphaMap) op = PictOpSrc; if (!miComputeCompositeRegion (®ion, diff --git a/fb/fbmmx.c b/fb/fbmmx.c index d9c3af2ed..6517122d4 100644 --- a/fb/fbmmx.c +++ b/fb/fbmmx.c @@ -32,8 +32,6 @@ #ifdef USE_MMX -#include "fb.h" -#include "fbmmx.h" #include @@ -43,6 +41,9 @@ #ifdef RENDER +#include "fb.h" +#include "fbmmx.h" + #include "picturestr.h" #include "mipict.h" #include "fbpict.h" -- cgit v1.2.3