diff options
author | David Reveman <c99drn@cs.umu.se> | 2005-03-01 16:34:31 +0000 |
---|---|---|
committer | David Reveman <c99drn@cs.umu.se> | 2005-03-01 16:34:31 +0000 |
commit | 2d2c1732620a83215983ee7a7dd469a1a85fcc12 (patch) | |
tree | b85ab918bb504550128995a4a7e38f671cdd018f /hw/xgl | |
parent | b4b27e9eaa43401ae70e5d03823012bf8c78848f (diff) |
Add dither support to Xgl
Diffstat (limited to 'hw/xgl')
-rw-r--r-- | hw/xgl/xgl.h | 1 | ||||
-rw-r--r-- | hw/xgl/xglcomp.c | 3 | ||||
-rw-r--r-- | hw/xgl/xglpict.c | 11 |
3 files changed, 12 insertions, 3 deletions
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); } |