summaryrefslogtreecommitdiff
path: root/hw/xgl
diff options
context:
space:
mode:
authorDavid Reveman <c99drn@cs.umu.se>2004-11-14 23:21:29 +0000
committerDavid Reveman <c99drn@cs.umu.se>2004-11-14 23:21:29 +0000
commitcecb668149e1956fb29bc89855182349122e2f4e (patch)
tree29fd952953fe9c5a5ab916080bafd55d8387e2fa /hw/xgl
parent343f965749af0a985573c525dc6084c2519b6ffe (diff)
Add xglPixmapToRegion
Diffstat (limited to 'hw/xgl')
-rw-r--r--hw/xgl/xgl.h4
-rw-r--r--hw/xgl/xglpixmap.c18
-rw-r--r--hw/xgl/xglscreen.c7
3 files changed, 24 insertions, 5 deletions
diff --git a/hw/xgl/xgl.h b/hw/xgl/xgl.h
index 71250ded6..3f1616af5 100644
--- a/hw/xgl/xgl.h
+++ b/hw/xgl/xgl.h
@@ -129,6 +129,7 @@ typedef struct _xglScreen {
CreateGCProcPtr CreateGC;
CloseScreenProcPtr CloseScreen;
SetWindowPixmapProcPtr SetWindowPixmap;
+ BitmapToRegionProcPtr BitmapToRegion;
#ifdef RENDER
CompositeProcPtr Composite;
@@ -615,6 +616,9 @@ xglModifyPixmapHeader (PixmapPtr pPixmap,
int devKind,
pointer pPixData);
+RegionPtr
+xglPixmapToRegion (PixmapPtr pPixmap);
+
Bool
xglCreatePixmapSurface (PixmapPtr pPixmap);
diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c
index 38965739c..099ded652 100644
--- a/hw/xgl/xglpixmap.c
+++ b/hw/xgl/xglpixmap.c
@@ -356,6 +356,24 @@ xglModifyPixmapHeader (PixmapPtr pPixmap,
return TRUE;
}
+RegionPtr
+xglPixmapToRegion (PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ RegionPtr pRegion;
+
+ XGL_SCREEN_PRIV (pScreen);
+
+ if (!xglSyncBits (&pPixmap->drawable, NullBox))
+ FatalError (XGL_SW_FAILURE_STRING);
+
+ XGL_SCREEN_UNWRAP (BitmapToRegion);
+ pRegion = (*pScreen->BitmapToRegion) (pPixmap);
+ XGL_SCREEN_WRAP (BitmapToRegion, xglPixmapToRegion);
+
+ return pRegion;
+}
+
Bool
xglCreatePixmapSurface (PixmapPtr pPixmap)
{
diff --git a/hw/xgl/xglscreen.c b/hw/xgl/xglscreen.c
index 9e1cfdfd7..b2e1e1f48 100644
--- a/hw/xgl/xglscreen.c
+++ b/hw/xgl/xglscreen.c
@@ -56,7 +56,6 @@ int xglWinPrivateIndex;
#define xglListInstalledColormaps (void *) NoopDDA
#define xglStoreColors (void *) NoopDDA
#define xglResolveColor (void *) NoopDDA
-#define xglBitmapToRegion (void *) NoopDDA
static PixmapPtr
xglGetWindowPixmap (WindowPtr pWin)
@@ -226,11 +225,9 @@ xglScreenInit (ScreenPtr pScreen,
pScreen->ResolveColor = miResolveColor;
*/
- /*
- pScreen->BitmapToRegion = xglBitmapToRegion;
- */
-
pScreen->ModifyPixmapHeader = xglModifyPixmapHeader;
+
+ XGL_SCREEN_WRAP (BitmapToRegion, xglPixmapToRegion);
pScreen->GetWindowPixmap = xglGetWindowPixmap;