[PATCH xserver 7/8] dix: Remove colormap private fixup

Adam Jackson ajax at redhat.com
Wed Jan 31 15:54:03 UTC 2018


The old xfree86 colormap system was the only thing that would register a
colormap private after the colormap was created.  Since that's gone now
we can remove the special case.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 dix/privates.c     | 21 +--------------------
 include/privates.h |  2 +-
 2 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/dix/privates.c b/dix/privates.c
index 9ca80f0b6..b28e60fe7 100644
--- a/dix/privates.c
+++ b/dix/privates.c
@@ -91,10 +91,10 @@ static const char *key_names[PRIVATE_LAST] = {
     /* These can have objects created before all of the keys are registered */
     [PRIVATE_SCREEN] = "SCREEN",
     [PRIVATE_EXTENSION] = "EXTENSION",
-    [PRIVATE_COLORMAP] = "COLORMAP",
     [PRIVATE_DEVICE] = "DEVICE",
 
     /* These cannot have any objects before all relevant keys are registered */
+    [PRIVATE_COLORMAP] = "COLORMAP",
     [PRIVATE_CLIENT] = "CLIENT",
     [PRIVATE_PROPERTY] = "PROPERTY",
     [PRIVATE_SELECTION] = "SELECTION",
@@ -250,24 +250,6 @@ fixupExtensions(FixupFunc fixup, unsigned bytes)
     return TRUE;
 }
 
-static Bool
-fixupDefaultColormaps(FixupFunc fixup, unsigned bytes)
-{
-    int s;
-
-    for (s = 0; s < screenInfo.numScreens; s++) {
-        ColormapPtr cmap;
-
-        dixLookupResourceByType((void **) &cmap,
-                                screenInfo.screens[s]->defColormap, RT_COLORMAP,
-                                serverClient, DixCreateAccess);
-        if (cmap &&
-            !fixup(&cmap->devPrivates, screenInfo.screens[s]->screenSpecificPrivates[PRIVATE_COLORMAP].offset, bytes))
-            return FALSE;
-    }
-    return TRUE;
-}
-
 static Bool
 fixupDeviceList(DeviceIntPtr device, FixupFunc fixup, unsigned bytes)
 {
@@ -290,7 +272,6 @@ static Bool (*const allocated_early[PRIVATE_LAST]) (FixupFunc, unsigned) = {
     [PRIVATE_SCREEN] = fixupScreens,
     [PRIVATE_CLIENT] = fixupServerClient,
     [PRIVATE_EXTENSION] = fixupExtensions,
-    [PRIVATE_COLORMAP] = fixupDefaultColormaps,
     [PRIVATE_DEVICE] = fixupDevices,
 };
 
diff --git a/include/privates.h b/include/privates.h
index e89c3e440..bbd8c3355 100644
--- a/include/privates.h
+++ b/include/privates.h
@@ -32,10 +32,10 @@ typedef enum {
     /* These can have objects created before all of the keys are registered */
     PRIVATE_SCREEN,
     PRIVATE_EXTENSION,
-    PRIVATE_COLORMAP,
     PRIVATE_DEVICE,
 
     /* These cannot have any objects before all relevant keys are registered */
+    PRIVATE_COLORMAP,
     PRIVATE_CLIENT,
     PRIVATE_PROPERTY,
     PRIVATE_SELECTION,
-- 
2.14.3



More information about the xorg-devel mailing list