Add dither support to Xgl

This commit is contained in:
David Reveman 2005-03-01 16:34:31 +00:00
parent b4b27e9eaa
commit 2d2c173262
3 changed files with 12 additions and 3 deletions

View File

@ -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)

View File

@ -71,9 +71,6 @@ xglComp (CARD8 op,
RegionRec region;
BoxPtr pBox;
int nBox;
if (pDst->dither != None)
return FALSE;
if (pDst->alphaMap)
return FALSE;

View File

@ -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);
}