summaryrefslogtreecommitdiff
path: root/exa/exa_migration.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2006-02-02 21:07:06 +0000
committerEric Anholt <anholt@freebsd.org>2006-02-02 21:07:06 +0000
commit5e2a7af23bd0f46fbddca34098cb297be58b7a55 (patch)
treef697bfdb546452a96e81f08dc8f53c6288dd85d2 /exa/exa_migration.c
parentee3c7ccb175752dbeaed6b0113d0819b3fcd2398 (diff)
Move the frequently-repeated code to get the pixmap that backs a drawable
to a new function, exaGetDrawablePixmap().
Diffstat (limited to 'exa/exa_migration.c')
-rw-r--r--exa/exa_migration.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 42491247c..2acda24da 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -235,27 +235,13 @@ exaMoveOutPixmap (PixmapPtr pPixmap)
void
exaDrawableUseScreen(DrawablePtr pDrawable)
{
- PixmapPtr pPixmap;
-
- if (pDrawable->type == DRAWABLE_WINDOW)
- pPixmap = (*pDrawable->pScreen->GetWindowPixmap) ((WindowPtr) pDrawable);
- else
- pPixmap = (PixmapPtr) pDrawable;
-
- exaPixmapUseScreen (pPixmap);
+ exaPixmapUseScreen (exaGetDrawablePixmap (pDrawable));
}
void
exaDrawableUseMemory(DrawablePtr pDrawable)
{
- PixmapPtr pPixmap;
-
- if (pDrawable->type == DRAWABLE_WINDOW)
- pPixmap = (*pDrawable->pScreen->GetWindowPixmap) ((WindowPtr) pDrawable);
- else
- pPixmap = (PixmapPtr) pDrawable;
-
- exaPixmapUseMemory (pPixmap);
+ exaPixmapUseMemory (exaGetDrawablePixmap (pDrawable));
}
void