diff options
author | Lars Knoll <lars@trolltech.com> | 2005-07-04 14:47:03 +0000 |
---|---|---|
committer | Lars Knoll <lars@trolltech.com> | 2005-07-04 14:47:03 +0000 |
commit | ba011dc77dcfaea2843481fbba45a76d8cb9aa83 (patch) | |
tree | ece4b9c9698f76c8ad124db275065472df35d3ce /fb | |
parent | a4df8ad75579d9c183f110d79d87cfb9aaf23acd (diff) |
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.
Diffstat (limited to 'fb')
-rw-r--r-- | fb/fbcompose.c | 5 | ||||
-rw-r--r-- | fb/fbmmx.c | 5 |
2 files changed, 4 insertions, 6 deletions
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 <mmintrin.h> @@ -43,6 +41,9 @@ #ifdef RENDER +#include "fb.h" +#include "fbmmx.h" + #include "picturestr.h" #include "mipict.h" #include "fbpict.h" |