xserver: Branch 'master' - 2 commits

Adam Jackson ajax at kemper.freedesktop.org
Tue Nov 14 21:19:55 UTC 2017


 Xext/xres.c                    |   34 +++++++++++++++++++++-------------
 hw/dmx/glxProxy/glxcontext.h   |    2 --
 hw/dmx/glxProxy/glxscreens.h   |    2 --
 hw/xquartz/GL/glcontextmodes.h |    2 --
 hw/xquartz/GL/visualConfigs.c  |    1 -
 5 files changed, 21 insertions(+), 20 deletions(-)

New commits:
commit dbda03d5d15bec8fdff64bc8545875c39da81777
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Nov 6 16:41:14 2017 -0500

    glx: Drop references to <GL/internal/glcore.h>
    
    This header is a truly ancient remnant of the SGI SI code, which used
    the same struct for visual/fbconfig state on both sides of the wire.
    We're not using this struct ourselves so let's stop depending on the
    header.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxcontext.h b/hw/dmx/glxProxy/glxcontext.h
index ac8c0573d..479186ca5 100644
--- a/hw/dmx/glxProxy/glxcontext.h
+++ b/hw/dmx/glxProxy/glxcontext.h
@@ -33,8 +33,6 @@
 
 typedef struct __GLXcontextRec __GLXcontext;
 
-#include "GL/internal/glcore.h"
-
 struct __GLXcontextRec {
     /*
      ** list of context structs
diff --git a/hw/dmx/glxProxy/glxscreens.h b/hw/dmx/glxProxy/glxscreens.h
index bb7477bc7..5f36b8158 100644
--- a/hw/dmx/glxProxy/glxscreens.h
+++ b/hw/dmx/glxProxy/glxscreens.h
@@ -31,8 +31,6 @@
  * Silicon Graphics, Inc.
  */
 
-#include "GL/internal/glcore.h"
-
 typedef struct {
 
     __GLXvisualConfig *pGlxVisual;
diff --git a/hw/xquartz/GL/glcontextmodes.h b/hw/xquartz/GL/glcontextmodes.h
index 7237ccc06..5b64add29 100644
--- a/hw/xquartz/GL/glcontextmodes.h
+++ b/hw/xquartz/GL/glcontextmodes.h
@@ -30,8 +30,6 @@
 #ifndef GLCONTEXTMODES_H
 #define GLCONTEXTMODES_H
 
-#include "GL/internal/glcore.h"
-
 #if !defined(IN_MINI_GLX)
 extern GLint
 _gl_convert_from_x_visual_type(int visualType);
diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c
index ce68663cd..69b18f6a0 100644
--- a/hw/xquartz/GL/visualConfigs.c
+++ b/hw/xquartz/GL/visualConfigs.c
@@ -51,7 +51,6 @@
 #include <glxcontext.h>
 #include <glxext.h>
 #include <glxutil.h>
-#include <GL/internal/glcore.h>
 
 #include "capabilities.h"
 #include "visualConfigs.h"
commit eafcd009f1fe3e554219a428237ef1c71d1ba506
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Oct 24 14:33:19 2017 -0400

    xres: Return the atom naming the type, not its internal type number
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/Xext/xres.c b/Xext/xres.c
index 02421588a..7a7aabc9b 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -274,6 +274,24 @@ ResFindAllRes(void *value, XID id, RESTYPE type, void *cdata)
     counts[(type & TypeMask) - 1]++;
 }
 
+static CARD32
+resourceTypeAtom(int i)
+{
+    CARD32 ret;
+
+    const char *name = LookupResourceName(i);
+    if (strcmp(name, XREGISTRY_UNKNOWN))
+        ret = MakeAtom(name, strlen(name), TRUE);
+    else {
+        char buf[40];
+
+        snprintf(buf, sizeof(buf), "Unregistered resource %i", i + 1);
+        ret = MakeAtom(buf, strlen(buf), TRUE);
+    }
+
+    return ret;
+}
+
 static int
 ProcXResQueryClientResources(ClientPtr client)
 {
@@ -318,22 +336,12 @@ ProcXResQueryClientResources(ClientPtr client)
 
     if (num_types) {
         xXResType scratch;
-        const char *name;
 
         for (i = 0; i < lastResourceType; i++) {
             if (!counts[i])
                 continue;
 
-            name = LookupResourceName(i + 1);
-            if (strcmp(name, XREGISTRY_UNKNOWN))
-                scratch.resource_type = MakeAtom(name, strlen(name), TRUE);
-            else {
-                char buf[40];
-
-                snprintf(buf, sizeof(buf), "Unregistered resource %i", i + 1);
-                scratch.resource_type = MakeAtom(buf, strlen(buf), TRUE);
-            }
-
+            scratch.resource_type = resourceTypeAtom(i + 1);
             scratch.count = counts[i];
 
             if (client->swapped) {
@@ -693,7 +701,7 @@ AddSubResourceSizeSpec(void *value,
                 sizeFunc(value, id, &size);
 
                 crossRef->spec.resource = id;
-                crossRef->spec.type = type;
+                crossRef->spec.type = resourceTypeAtom(type);
                 crossRef->bytes = size.resourceSize;
                 crossRef->refCount = size.refCnt;
                 crossRef->useCount = 1;
@@ -766,7 +774,7 @@ AddResourceSizeValue(void *ptr, XID id, RESTYPE type, void *cdata)
             sizeFunc(ptr, id, &size);
 
             value->size.spec.resource = id;
-            value->size.spec.type = type;
+            value->size.spec.type = resourceTypeAtom(type);
             value->size.bytes = size.resourceSize;
             value->size.refCount = size.refCnt;
             value->size.useCount = 1;


More information about the xorg-commit mailing list