From 57818d0fe4f7cf94279909f03ec11b326b284f1e Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 26 Nov 2010 15:22:07 +0000 Subject: libXext xserver libfontenc libX11 libxcb pixman git update 26 11 2010 --- xorg-server/hw/xquartz/xpr/dri.c | 112 --------------------------------------- 1 file changed, 112 deletions(-) (limited to 'xorg-server/hw/xquartz/xpr/dri.c') diff --git a/xorg-server/hw/xquartz/xpr/dri.c b/xorg-server/hw/xquartz/xpr/dri.c index 252c2bb4c..7b730df8e 100644 --- a/xorg-server/hw/xquartz/xpr/dri.c +++ b/xorg-server/hw/xquartz/xpr/dri.c @@ -89,14 +89,6 @@ static x_hash_table *surface_hash; /* maps surface ids -> drawablePrivs */ static Bool DRIFreePixmapImp(DrawablePtr pDrawable); -/* FIXME: don't hardcode this? */ -#define CG_INFO_FILE "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/Info-macos.plist" - -/* Corresponds to SU Jaguar Green */ -#define CG_REQUIRED_MAJOR 1 -#define CG_REQUIRED_MINOR 157 -#define CG_REQUIRED_MICRO 11 - typedef struct { DrawablePtr pDrawable; int refCount; @@ -109,96 +101,6 @@ typedef struct { void *buffer; } DRIPixmapBuffer, *DRIPixmapBufferPtr; -/* Returns version as major.minor.micro in 10.10.10 fixed form */ -static unsigned int -get_cg_version (void) -{ - static unsigned int version; - - FILE *fh; - char *ptr; - - if (version != 0) - return version; - - /* I tried CFBundleGetVersion, but it returns zero, so.. */ - - fh = fopen (CG_INFO_FILE, "r"); - if (fh != NULL) - { - char buf[256]; - - while (fgets (buf, sizeof (buf), fh) != NULL) - { - unsigned char c; - - if (!strstr (buf, "CFBundleShortVersionString") - || fgets (buf, sizeof (buf), fh) == NULL) - { - continue; - } - - ptr = strstr (buf, ""); - if (ptr == NULL) - continue; - - ptr += strlen (""); - - /* Now PTR points to "MAJOR.MINOR.MICRO". */ - - version = 0; - - again: - switch ((c = *ptr++)) - { - case '.': - version = version * 1024; - goto again; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - version = ((version & ~0x3ff) - + (version & 0x3ff) * 10 + (c - '0')); - goto again; - } - break; - } - - fclose (fh); - } - - return version; -} - -static Bool -test_cg_version (unsigned int major, unsigned int minor, unsigned int micro) -{ - unsigned int cg_ver = get_cg_version (); - - unsigned int cg_major = (cg_ver >> 20) & 0x3ff; - unsigned int cg_minor = (cg_ver >> 10) & 0x3ff; - unsigned int cg_micro = cg_ver & 0x3ff; - - if (cg_major > major) - return TRUE; - else if (cg_major < major) - return FALSE; - - /* cg_major == major */ - - if (cg_minor > minor) - return TRUE; - else if (cg_minor < minor) - return FALSE; - - /* cg_minor == minor */ - - if (cg_micro < micro) - return FALSE; - - return TRUE; -} - Bool DRIScreenInit(ScreenPtr pScreen) { @@ -224,20 +126,6 @@ DRIScreenInit(ScreenPtr pScreen) pDRIPriv->directRenderingSupport = TRUE; pDRIPriv->nrWindows = 0; - /* Need recent cg for window access update */ - if (!test_cg_version (CG_REQUIRED_MAJOR, - CG_REQUIRED_MINOR, - CG_REQUIRED_MICRO)) - { - ErrorF ("[DRI] disabled direct rendering; requires CoreGraphics %d.%d.%d\n", - CG_REQUIRED_MAJOR, CG_REQUIRED_MINOR, CG_REQUIRED_MICRO); - - pDRIPriv->directRenderingSupport = FALSE; - - /* Note we don't nuke the dri private, since we need it for - managing indirect surfaces. */ - } - /* Initialize drawable tables */ for (i = 0; i < DRI_MAX_DRAWABLES; i++) { pDRIPriv->DRIDrawables[i] = NULL; -- cgit v1.2.3