summaryrefslogtreecommitdiff
path: root/render
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 /render
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 'render')
-rw-r--r--render/picture.c8
-rw-r--r--render/picturestr.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/render/picture.c b/render/picture.c
index 788785354..ebbfa29e9 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -50,6 +50,14 @@ RESTYPE PictFormatType;
RESTYPE GlyphSetType;
int PictureCmapPolicy = PictureCmapPolicyDefault;
+PictFormatPtr
+PictureWindowFormat(WindowPtr pWindow)
+{
+ ScreenPtr pScreen = pWindow->drawable.pScreen;
+ return PictureMatchVisual(pScreen, pWindow->drawable.depth,
+ WindowGetVisual(pWindow));
+}
+
Bool
PictureDestroyWindow(WindowPtr pWindow)
{
diff --git a/render/picturestr.h b/render/picturestr.h
index 6da56563d..1cda88a80 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -377,6 +377,9 @@ extern _X_EXPORT RESTYPE GlyphSetType;
} \
} \
+extern _X_EXPORT PictFormatPtr
+ PictureWindowFormat(WindowPtr pWindow);
+
extern _X_EXPORT Bool
PictureDestroyWindow(WindowPtr pWindow);