summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2008-04-21 11:22:07 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2008-04-21 23:07:39 +0200
commit3f081b4de55e1378728a24d069bf06575ffca2d8 (patch)
treea4f0fe80347b2ff5ba3b2f3835a64f3d4d913d7d
parent26c1801a27b81fdd988d5bd210ba0e76ecc274ae (diff)
EXA: Set pixmap->accel_blocked on the screen pixmap, too.
-rw-r--r--exa/exa.c32
-rw-r--r--exa/exa_priv.h1
2 files changed, 33 insertions, 0 deletions
diff --git a/exa/exa.c b/exa/exa.c
index 0e3ea7036..3a6ad988e 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -699,6 +699,34 @@ exaBitmapToRegion(PixmapPtr pPix)
return ret;
}
+static Bool
+exaCreateScreenResources(ScreenPtr pScreen)
+{
+ ExaScreenPriv(pScreen);
+ PixmapPtr pScreenPixmap;
+ Bool b;
+
+ pScreen->CreateScreenResources = pExaScr->SavedCreateScreenResources;
+ b = pScreen->CreateScreenResources(pScreen);
+ pScreen->CreateScreenResources = exaCreateScreenResources;
+
+ if (!b)
+ return FALSE;
+
+ pScreenPixmap = pScreen->GetScreenPixmap(pScreen);
+
+ if (pScreenPixmap) {
+ ExaPixmapPriv(pScreenPixmap);
+
+ exaSetAccelBlock(pExaScr, pExaPixmap,
+ pScreenPixmap->drawable.width,
+ pScreenPixmap->drawable.height,
+ pScreenPixmap->drawable.bitsPerPixel);
+ }
+
+ return TRUE;
+}
+
/**
* exaCloseScreen() unwraps its wrapped screen functions and tears down EXA's
* screen private, before calling down to the next CloseSccreen.
@@ -720,6 +748,7 @@ exaCloseScreen(int i, ScreenPtr pScreen)
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
pScreen->ChangeWindowAttributes = pExaScr->SavedChangeWindowAttributes;
pScreen->BitmapToRegion = pExaScr->SavedBitmapToRegion;
+ pScreen->CreateScreenResources = pExaScr->SavedCreateScreenResources;
#ifdef RENDER
if (ps) {
ps->Composite = pExaScr->SavedComposite;
@@ -877,6 +906,9 @@ exaDriverInit (ScreenPtr pScreen,
pExaScr->SavedBitmapToRegion = pScreen->BitmapToRegion;
pScreen->BitmapToRegion = exaBitmapToRegion;
+ pExaScr->SavedCreateScreenResources = pScreen->CreateScreenResources;
+ pScreen->CreateScreenResources = exaCreateScreenResources;
+
#ifdef RENDER
if (ps) {
pExaScr->SavedComposite = ps->Composite;
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index e41f46aba..0138e4a7d 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -107,6 +107,7 @@ typedef struct {
CopyWindowProcPtr SavedCopyWindow;
ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
BitmapToRegionProcPtr SavedBitmapToRegion;
+ CreateScreenResourcesProcPtr SavedCreateScreenResources;
ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader;
#ifdef RENDER
CompositeProcPtr SavedComposite;