[PATCH 18/36] privates: when pixmap privates increase, bump the totalPixmapSize
Dave Airlie
airlied at gmail.com
Mon Jul 2 03:13:11 PDT 2012
From: Dave Airlie <airlied at redhat.com>
This bumps totalPixmapSize in all attached screens.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
dix/privates.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/dix/privates.c b/dix/privates.c
index af6d327..7f7ec8b 100644
--- a/dix/privates.c
+++ b/dix/privates.c
@@ -168,11 +168,28 @@ fixupDefaultColormaps(FixupFunc fixup, unsigned bytes)
return TRUE;
}
+static Bool
+fixupTotalPixmapSizes(FixupFunc fixup, unsigned bytes)
+{
+ int s;
+
+ for (s = 0; s < screenInfo.numScreens; s++) {
+ ScreenPtr pScreen = screenInfo.screens[s];
+ pScreen->totalPixmapSize += bytes;
+ }
+ for (s = 0; s < screenInfo.numGPUScreens; s++) {
+ ScreenPtr pScreen = screenInfo.gpuscreens[s];
+ pScreen->totalPixmapSize += bytes;
+ }
+ return TRUE;
+}
+
static Bool (*const allocated_early[PRIVATE_LAST]) (FixupFunc, unsigned) = {
[PRIVATE_SCREEN] = fixupScreens,
[PRIVATE_CLIENT] = fixupServerClient,
[PRIVATE_EXTENSION] = fixupExtensions,
- [PRIVATE_COLORMAP] = fixupDefaultColormaps,};
+ [PRIVATE_COLORMAP] = fixupDefaultColormaps,
+ [PRIVATE_PIXMAP] = fixupTotalPixmapSizes,};
/*
* Register a private key. This takes the type of object the key will
--
1.7.10.2
More information about the xorg-devel
mailing list