summaryrefslogtreecommitdiff
path: root/composite
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-06-27 14:36:04 +0100
committerKeith Packard <keithp@keithp.com>2012-06-28 10:43:35 -0700
commit957bf959fb577b292a3e4f6bb67740ca09e7aeb9 (patch)
tree54093fb0af60b8ff0b22d647fe3c7b9a5f3d4cfb /composite
parenta7b97b0fa85d695ae19d194cfa3267159d149e5d (diff)
dix/render: consolidate window format matching code.
This code existed in 3 different forms, perhaps it should be consolidated. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'composite')
-rw-r--r--composite/compalloc.c4
-rw-r--r--composite/compint.h2
-rw-r--r--composite/compwindow.c26
3 files changed, 4 insertions, 28 deletions
diff --git a/composite/compalloc.c b/composite/compalloc.c
index b958b0942..cc69c68f2 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -560,8 +560,8 @@ compNewPixmap(WindowPtr pWin, int x, int y, int w, int h)
}
}
else {
- PictFormatPtr pSrcFormat = compWindowFormat(pParent);
- PictFormatPtr pDstFormat = compWindowFormat(pWin);
+ PictFormatPtr pSrcFormat = PictureWindowFormat(pParent);
+ PictFormatPtr pDstFormat = PictureWindowFormat(pWin);
XID inferiors = IncludeInferiors;
int error;
diff --git a/composite/compint.h b/composite/compint.h
index 9e2713e93..30b724e3e 100644
--- a/composite/compint.h
+++ b/composite/compint.h
@@ -272,8 +272,6 @@ void
#define compCheckTree(s)
#endif
-PictFormatPtr compWindowFormat(WindowPtr pWin);
-
void
compSetPixmap(WindowPtr pWin, PixmapPtr pPixmap);
diff --git a/composite/compwindow.c b/composite/compwindow.c
index 6eb624b11..d0bcd183f 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -631,28 +631,6 @@ compGetRedirectBorderClip(WindowPtr pWin)
return &cw->borderClip;
}
-static VisualPtr
-compGetWindowVisual(WindowPtr pWin)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
- VisualID vid = wVisual(pWin);
- int i;
-
- for (i = 0; i < pScreen->numVisuals; i++)
- if (pScreen->visuals[i].vid == vid)
- return &pScreen->visuals[i];
- return 0;
-}
-
-PictFormatPtr
-compWindowFormat(WindowPtr pWin)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
- return PictureMatchVisual(pScreen, pWin->drawable.depth,
- compGetWindowVisual(pWin));
-}
-
static void
compWindowUpdateAutomatic(WindowPtr pWin)
{
@@ -660,8 +638,8 @@ compWindowUpdateAutomatic(WindowPtr pWin)
ScreenPtr pScreen = pWin->drawable.pScreen;
WindowPtr pParent = pWin->parent;
PixmapPtr pSrcPixmap = (*pScreen->GetWindowPixmap) (pWin);
- PictFormatPtr pSrcFormat = compWindowFormat(pWin);
- PictFormatPtr pDstFormat = compWindowFormat(pWin->parent);
+ PictFormatPtr pSrcFormat = PictureWindowFormat(pWin);
+ PictFormatPtr pDstFormat = PictureWindowFormat(pWin->parent);
int error;
RegionPtr pRegion = DamageRegion(cw->damage);
PicturePtr pSrcPicture = CreatePicture(0, &pSrcPixmap->drawable,