Add dither support to Xgl
This commit is contained in:
parent
b4b27e9eaa
commit
2d2c173262
|
@ -320,6 +320,7 @@ extern int xglGCPrivateIndex;
|
||||||
#define xglPCFilterMask (1L << 1)
|
#define xglPCFilterMask (1L << 1)
|
||||||
#define xglPCTransformMask (1L << 2)
|
#define xglPCTransformMask (1L << 2)
|
||||||
#define xglPCComponentAlphaMask (1L << 3)
|
#define xglPCComponentAlphaMask (1L << 3)
|
||||||
|
#define xglPCDitherMask (1L << 4)
|
||||||
|
|
||||||
#define xglPFFilterMask (1L << 8)
|
#define xglPFFilterMask (1L << 8)
|
||||||
|
|
||||||
|
|
|
@ -72,9 +72,6 @@ xglComp (CARD8 op,
|
||||||
BoxPtr pBox;
|
BoxPtr pBox;
|
||||||
int nBox;
|
int nBox;
|
||||||
|
|
||||||
if (pDst->dither != None)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (pDst->alphaMap)
|
if (pDst->alphaMap)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
|
@ -164,6 +164,9 @@ xglChangePicture (PicturePtr pPicture,
|
||||||
if (pPicture->stateChanges & CPComponentAlpha)
|
if (pPicture->stateChanges & CPComponentAlpha)
|
||||||
pPixmapPriv->pictureMask |= xglPCComponentAlphaMask;
|
pPixmapPriv->pictureMask |= xglPCComponentAlphaMask;
|
||||||
|
|
||||||
|
if (pPicture->stateChanges & CPDither)
|
||||||
|
pPixmapPriv->pictureMask |= xglPCDitherMask;
|
||||||
|
|
||||||
XGL_PICTURE_SCREEN_UNWRAP (ChangePicture);
|
XGL_PICTURE_SCREEN_UNWRAP (ChangePicture);
|
||||||
(*pPictureScreen->ChangePicture) (pPicture, mask);
|
(*pPictureScreen->ChangePicture) (pPicture, mask);
|
||||||
XGL_PICTURE_SCREEN_WRAP (ChangePicture, xglChangePicture);
|
XGL_PICTURE_SCREEN_WRAP (ChangePicture, xglChangePicture);
|
||||||
|
@ -269,6 +272,14 @@ xglUpdatePicture (PicturePtr pPicture)
|
||||||
glitz_surface_set_component_alpha (surface, 0);
|
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);
|
pPixmapPriv->pictureMask &= ~XGL_PICTURE_CHANGES (~0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue