diff --git a/hw/xgl/xgl.h b/hw/xgl/xgl.h index eae94a1ac..bf463bd48 100644 --- a/hw/xgl/xgl.h +++ b/hw/xgl/xgl.h @@ -320,6 +320,7 @@ extern int xglGCPrivateIndex; #define xglPCFilterMask (1L << 1) #define xglPCTransformMask (1L << 2) #define xglPCComponentAlphaMask (1L << 3) +#define xglPCDitherMask (1L << 4) #define xglPFFilterMask (1L << 8) diff --git a/hw/xgl/xglcomp.c b/hw/xgl/xglcomp.c index 3783af97c..3d153f34c 100644 --- a/hw/xgl/xglcomp.c +++ b/hw/xgl/xglcomp.c @@ -71,9 +71,6 @@ xglComp (CARD8 op, RegionRec region; BoxPtr pBox; int nBox; - - if (pDst->dither != None) - return FALSE; if (pDst->alphaMap) return FALSE; diff --git a/hw/xgl/xglpict.c b/hw/xgl/xglpict.c index 90f1c900e..dcb1f485f 100644 --- a/hw/xgl/xglpict.c +++ b/hw/xgl/xglpict.c @@ -164,6 +164,9 @@ xglChangePicture (PicturePtr pPicture, if (pPicture->stateChanges & CPComponentAlpha) pPixmapPriv->pictureMask |= xglPCComponentAlphaMask; + if (pPicture->stateChanges & CPDither) + pPixmapPriv->pictureMask |= xglPCDitherMask; + XGL_PICTURE_SCREEN_UNWRAP (ChangePicture); (*pPictureScreen->ChangePicture) (pPicture, mask); XGL_PICTURE_SCREEN_WRAP (ChangePicture, xglChangePicture); @@ -269,6 +272,14 @@ xglUpdatePicture (PicturePtr pPicture) glitz_surface_set_component_alpha (surface, 0); } + if (pPixmapPriv->pictureMask & xglPCDitherMask) + { + if (pPicture->dither) + glitz_surface_set_dither (surface, 1); + else + glitz_surface_set_dither (surface, 0); + } + pPixmapPriv->pictureMask &= ~XGL_PICTURE_CHANGES (~0); }