From 00eedc704dc84e370faa448af3862fc103232a1e Mon Sep 17 00:00:00 2001 From: David Reveman Date: Mon, 4 Aug 2008 13:42:17 -0400 Subject: [PATCH] Add offscreen optimization to dmxShmPutImage. --- hw/dmx/dmxscrinit.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c index c97064786..175005e01 100644 --- a/hw/dmx/dmxscrinit.c +++ b/hw/dmx/dmxscrinit.c @@ -103,7 +103,22 @@ dmxShmPutImage (DrawablePtr dst, char *data) { PixmapPtr pmap; - GCPtr putGC; + GCPtr putGC; + + if (dst->type == DRAWABLE_WINDOW) + { + dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV ((WindowPtr) (dst)); + + if (!pWinPriv->window || (dmxOffScreenOpt && pWinPriv->offscreen)) + return; + } + else + { + dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV ((PixmapPtr) (dst)); + + if (!pPixPriv->pixmap) + return; + } putGC = GetScratchGC(depth, dst->pScreen); if (!putGC)