aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-23 14:53:52 +0200
committermarha <marha@users.sourceforge.net>2012-04-23 14:53:52 +0200
commitcd27f58626705bcb561115b8e5b0d1430df83fa6 (patch)
tree0fea00b96d0cb4a9d55bd0792e5b4634c78864d6
parent588abfd54eb267dd79fe441e42aee9fc7534eb6e (diff)
parentb68922d51f52ca6ab9daa0105ef5c57f35bfbdcf (diff)
downloadvcxsrv-cd27f58626705bcb561115b8e5b0d1430df83fa6.tar.gz
vcxsrv-cd27f58626705bcb561115b8e5b0d1430df83fa6.tar.bz2
vcxsrv-cd27f58626705bcb561115b8e5b0d1430df83fa6.zip
Merge remote-tracking branch 'origin/released'
-rw-r--r--fontconfig/conf.d/30-metric-aliases.conf50
-rw-r--r--fontconfig/configure.in4
-rw-r--r--fontconfig/doc/fccache.fncs9
-rw-r--r--fontconfig/doc/fcconfig.fncs2
-rw-r--r--fontconfig/fc-cache/fc-cache.c73
-rw-r--r--fontconfig/fontconfig/fontconfig.h11
-rw-r--r--fontconfig/src/fccache.c85
-rw-r--r--fontconfig/src/fccfg.c2
-rw-r--r--fontconfig/src/fcint.h3
-rw-r--r--fontconfig/src/fcstr.c2
-rw-r--r--libXau/AuFileName.c159
-rw-r--r--libXext/include/X11/extensions/sync.h2
-rw-r--r--libXext/src/Xge.c10
-rw-r--r--libxcb/src/xcb_util.c2
-rw-r--r--mesalib/docs/viewperf.html4
-rw-r--r--mesalib/src/mapi/glapi/glapi_gentable.c2
-rw-r--r--mesalib/src/mesa/main/arrayobj.c1
-rw-r--r--mesalib/src/mesa/main/attrib.c7
-rw-r--r--mesalib/src/mesa/main/enable.c3
-rw-r--r--mesalib/src/mesa/main/mtypes.h5
-rw-r--r--mesalib/src/mesa/main/state.c2
-rw-r--r--mesalib/src/mesa/main/varray.c10
-rw-r--r--pixman/pixman/pixman-bits-image.c10
-rw-r--r--pixman/test/utils.c13
24 files changed, 276 insertions, 195 deletions
diff --git a/fontconfig/conf.d/30-metric-aliases.conf b/fontconfig/conf.d/30-metric-aliases.conf
index 4202ae92e..ccc3e246d 100644
--- a/fontconfig/conf.d/30-metric-aliases.conf
+++ b/fontconfig/conf.d/30-metric-aliases.conf
@@ -29,10 +29,14 @@
Albany AMT
Thorndale AMT
Cumberland AMT
+ Google CrOS Core fonts:
+ Arimo
+ Cousine
+ Tinos
Of these, URW fonts are design compatible with PostScrict fonts,
- and the Liberation, StarOffice, and AMT ones are compatible with
- Microsoft fonts.
+ and the Liberation, StarOffice, AMT and CrOS Core ones are
+ compatible with Microsoft fonts.
We want for each of them to fallback to any of these
available, but in an order preferring similar designs
@@ -75,6 +79,13 @@
<!-- Microsoft -->
<alias binding="same">
+ <family>Arimo</family>
+ <default>
+ <family>Arial</family>
+ </default>
+ </alias>
+
+ <alias binding="same">
<family>Liberation Sans</family>
<default>
<family>Arial</family>
@@ -96,6 +107,13 @@
</alias>
<alias binding="same">
+ <family>Tinos</family>
+ <default>
+ <family>Times New Roman</family>
+ </default>
+ </alias>
+
+ <alias binding="same">
<family>Liberation Serif</family>
<default>
<family>Times New Roman</family>
@@ -117,6 +135,13 @@
</alias>
<alias binding="same">
+ <family>Cousine</family>
+ <default>
+ <family>Courier New</family>
+ </default>
+ </alias>
+
+ <alias binding="same">
<family>Liberation Mono</family>
<default>
<family>Courier New</family>
@@ -219,27 +244,30 @@
<alias binding="same">
<family>Arial</family>
<accept>
- <family>Liberation Sans</family>
- <family>Albany</family>
- <family>Albany AMT</family>
+ <family>Arimo</family>
+ <family>Liberation Sans</family>
+ <family>Albany</family>
+ <family>Albany AMT</family>
</accept>
</alias>
<alias binding="same">
<family>Times New Roman</family>
<accept>
- <family>Liberation Serif</family>
- <family>Thorndale</family>
- <family>Thorndale AMT</family>
+ <family>Tinos</family>
+ <family>Liberation Serif</family>
+ <family>Thorndale</family>
+ <family>Thorndale AMT</family>
</accept>
</alias>
<alias binding="same">
<family>Courier New</family>
<accept>
- <family>Liberation Mono</family>
- <family>Cumberland</family>
- <family>Cumberland AMT</family>
+ <family>Cousine</family>
+ <family>Liberation Mono</family>
+ <family>Cumberland</family>
+ <family>Cumberland AMT</family>
</accept>
</alias>
diff --git a/fontconfig/configure.in b/fontconfig/configure.in
index 9bb0988ec..62bc25e4a 100644
--- a/fontconfig/configure.in
+++ b/fontconfig/configure.in
@@ -138,11 +138,9 @@ AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol
#
# regex
#
-use_regex=0
if test "x$ac_cv_func_regcomp" = "xyes" -a "x$ac_cv_func_regerror" = "xyes" -a "x$ac_cv_func_regexec" = "xyes" -a "x$ac_cv_func_regfree"; then
- use_regex=1
+ AC_DEFINE(USE_REGEX,,[Use regex])
fi
-AC_DEFINE_UNQUOTED(USE_REGEX,$use_regex,[Use regex.])
#
# Checks for iconv
diff --git a/fontconfig/doc/fccache.fncs b/fontconfig/doc/fccache.fncs
index 2f5fa4766..ca8ffa03c 100644
--- a/fontconfig/doc/fccache.fncs
+++ b/fontconfig/doc/fccache.fncs
@@ -75,3 +75,12 @@ FcCacheCopySet.
This tries to clean up the cache directory of <parameter>cache_dir</parameter>.
This returns FcTrue if the operation is successfully complete. otherwise FcFalse.
@@
+
+@RET@ void
+@FUNC@ FcCacheCreateTagFile
+@TYPE1@ const FcConfig * @ARG1@ config
+@PURPOSE@ Create CACHEDIR.TAG at cache directory.
+@DESC@
+This tries to create CACHEDIR.TAG file at the cache directory registered
+to <parameter>config</parameter>.
+@@
diff --git a/fontconfig/doc/fcconfig.fncs b/fontconfig/doc/fcconfig.fncs
index 9b9f66e1f..10028b465 100644
--- a/fontconfig/doc/fcconfig.fncs
+++ b/fontconfig/doc/fcconfig.fncs
@@ -154,7 +154,7 @@ simply returns NULL to indicate that no per-user file exists.
@RET@ FcStrList *
@FUNC@ FcConfigGetCacheDirs
-@TYPE1@ FcConfig * @ARG1@ config
+@TYPE1@ const FcConfig * @ARG1@ config
@PURPOSE@ return the list of directories searched for cache files
@DESC@
<function>FcConfigGetCacheDirs</function> returns a string list containing
diff --git a/fontconfig/fc-cache/fc-cache.c b/fontconfig/fc-cache/fc-cache.c
index b42fd3545..9fb383be0 100644
--- a/fontconfig/fc-cache/fc-cache.c
+++ b/fontconfig/fc-cache/fc-cache.c
@@ -42,14 +42,6 @@
#include <dirent.h>
#include <string.h>
-#ifndef FC_DIR_SEPARATOR_S
-# ifdef _WIN32
-# define FC_DIR_SEPARATOR_S "\\"
-# else
-# define FC_DIR_SEPARATOR_S "/"
-# endif
-#endif
-
#if defined (_WIN32)
#define STRICT
#include <windows.h>
@@ -122,69 +114,6 @@ usage (char *program, int error)
static FcStrSet *processed_dirs;
-/* Create CACHEDIR.TAG */
-static FcBool
-create_tag_file (FcConfig *config, FcBool verbose)
-{
- FcChar8 *cache_tag;
- FcChar8 *cache_dir = NULL;
- FcStrList *list;
- int fd;
- FILE *fp;
- FcAtomic *atomic;
- static const FcChar8 cache_tag_contents[] =
- "Signature: 8a477f597d28d172789f06886806bc55\n"
- "# This file is a cache directory tag created by fontconfig.\n"
- "# For information about cache directory tags, see:\n"
- "# http://www.brynosaurus.com/cachedir/\n";
- static size_t cache_tag_contents_size = sizeof (cache_tag_contents) - 1;
- FcBool ret = FcTrue;
-
- list = FcConfigGetCacheDirs(config);
- if (!list)
- return FcFalse;
-
- while ((cache_dir = FcStrListNext (list)))
- {
- if (access ((char *) cache_dir, W_OK|X_OK) == 0)
- {
- if (verbose)
- printf ("Create CACHEDIR.TAG at %s\n", cache_dir);
- /* Create CACHEDIR.TAG */
- cache_tag = FcStrPlus (cache_dir, (const FcChar8 *) FC_DIR_SEPARATOR_S "CACHEDIR.TAG");
- if (!cache_tag)
- return FcFalse;
- atomic = FcAtomicCreate ((FcChar8 *)cache_tag);
- if (!atomic)
- goto bail1;
- if (!FcAtomicLock (atomic))
- goto bail2;
- fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT, 0644);
- if (fd == -1)
- goto bail3;
- fp = fdopen(fd, "wb");
- if (fp == NULL)
- goto bail3;
-
- fwrite(cache_tag_contents, cache_tag_contents_size, sizeof (FcChar8), fp);
- fclose(fp);
-
- if (!FcAtomicReplaceOrig(atomic))
- goto bail3;
-
- bail3:
- FcAtomicUnlock (atomic);
- bail2:
- FcAtomicDestroy (atomic);
- bail1:
- FcStrFree (cache_tag);
- }
- }
- FcStrListDone (list);
-
- return ret;
-}
-
static int
scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, FcBool verbose, int *changed)
{
@@ -435,7 +364,7 @@ main (int argc, char **argv)
* This expects the fontconfig cache directory already exists.
* If it doesn't, it won't be simply created.
*/
- create_tag_file (config, verbose);
+ FcCacheCreateTagFile (config);
FcStrSetDestroy (processed_dirs);
diff --git a/fontconfig/fontconfig/fontconfig.h b/fontconfig/fontconfig/fontconfig.h
index 0e2ca509d..e4d57088d 100644
--- a/fontconfig/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig/fontconfig.h
@@ -112,9 +112,9 @@ typedef int FcBool;
#define FC_DECORATIVE "decorative" /* Bool - true if style is a decorative variant */
#define FC_LCD_FILTER "lcdfilter" /* Int */
-#define FC_CACHE_SUFFIX ".cache-"FC_CACHE_VERSION
-#define FC_DIR_CACHE_FILE "fonts.cache-"FC_CACHE_VERSION
-#define FC_USER_CACHE_FILE ".fonts.cache-"FC_CACHE_VERSION
+#define FC_CACHE_SUFFIX ".cache-" FC_CACHE_VERSION
+#define FC_DIR_CACHE_FILE "fonts.cache-" FC_CACHE_VERSION
+#define FC_USER_CACHE_FILE ".fonts.cache-" FC_CACHE_VERSION
/* Adjust outline rasterizer */
#define FC_CHAR_WIDTH "charwidth" /* Int */
@@ -331,6 +331,9 @@ FcDirCacheValid (const FcChar8 *cache_file);
FcPublic FcBool
FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose);
+FcPublic void
+FcCacheCreateTagFile (const FcConfig *config);
+
/* fccfg.c */
FcPublic FcChar8 *
FcConfigHome (void);
@@ -378,7 +381,7 @@ FcPublic FcBlanks *
FcConfigGetBlanks (FcConfig *config);
FcPublic FcStrList *
-FcConfigGetCacheDirs (FcConfig *config);
+FcConfigGetCacheDirs (const FcConfig *config);
FcPublic int
FcConfigGetRescanInterval (FcConfig *config);
diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c
index d3842ddff..d1fa7783b 100644
--- a/fontconfig/src/fccache.c
+++ b/fontconfig/src/fccache.c
@@ -931,6 +931,8 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config)
if (FcMakeDirectory (test_dir))
{
cache_dir = test_dir;
+ /* Create CACHEDIR.TAG */
+ FcDirCacheCreateTagFile (cache_dir);
break;
}
}
@@ -940,6 +942,8 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config)
else if (chmod ((char *) test_dir, 0755) == 0)
{
cache_dir = test_dir;
+ /* Try to create CACHEDIR.TAG too */
+ FcDirCacheCreateTagFile (cache_dir);
break;
}
}
@@ -1409,6 +1413,87 @@ static void MD5Transform(FcChar32 buf[4], FcChar32 in[16])
buf[2] += c;
buf[3] += d;
}
+
+FcBool
+FcDirCacheCreateTagFile (const FcChar8 *cache_dir)
+{
+ FcChar8 *cache_tag;
+ int fd;
+ FILE *fp;
+ FcAtomic *atomic;
+ static const FcChar8 cache_tag_contents[] =
+ "Signature: 8a477f597d28d172789f06886806bc55\n"
+ "# This file is a cache directory tag created by fontconfig.\n"
+ "# For information about cache directory tags, see:\n"
+ "# http://www.brynosaurus.com/cachedir/\n";
+ static size_t cache_tag_contents_size = sizeof (cache_tag_contents) - 1;
+ FcBool ret = FcFalse;
+
+ if (!cache_dir)
+ return FcFalse;
+
+ if (access ((char *) cache_dir, W_OK|X_OK) == 0)
+ {
+ /* Create CACHEDIR.TAG */
+ cache_tag = FcStrPlus (cache_dir, (const FcChar8 *) FC_DIR_SEPARATOR_S "CACHEDIR.TAG");
+ if (!cache_tag)
+ return FcFalse;
+ atomic = FcAtomicCreate ((FcChar8 *)cache_tag);
+ if (!atomic)
+ goto bail1;
+ if (!FcAtomicLock (atomic))
+ goto bail2;
+ fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT, 0644);
+ if (fd == -1)
+ goto bail3;
+ fp = fdopen(fd, "wb");
+ if (fp == NULL)
+ goto bail3;
+
+ fwrite(cache_tag_contents, cache_tag_contents_size, sizeof (FcChar8), fp);
+ fclose(fp);
+
+ if (!FcAtomicReplaceOrig(atomic))
+ goto bail3;
+
+ ret = FcTrue;
+ bail3:
+ FcAtomicUnlock (atomic);
+ bail2:
+ FcAtomicDestroy (atomic);
+ bail1:
+ FcStrFree (cache_tag);
+ }
+
+ if (FcDebug () & FC_DBG_CACHE)
+ {
+ if (ret)
+ printf ("Created CACHEDIR.TAG at %s\n", cache_dir);
+ else
+ printf ("Unable to create CACHEDIR.TAG at %s\n", cache_dir);
+ }
+
+ return ret;
+}
+
+void
+FcCacheCreateTagFile (const FcConfig *config)
+{
+ FcChar8 *cache_dir = NULL;
+ FcStrList *list;
+
+ list = FcConfigGetCacheDirs (config);
+ if (!list)
+ return;
+
+ while ((cache_dir = FcStrListNext (list)))
+ {
+ if (FcDirCacheCreateTagFile (cache_dir))
+ break;
+ }
+ FcStrListDone (list);
+}
+
#define __fccache__
#include "fcaliastail.h"
#undef __fccache__
diff --git a/fontconfig/src/fccfg.c b/fontconfig/src/fccfg.c
index bd1dc34d7..0d0b778d2 100644
--- a/fontconfig/src/fccfg.c
+++ b/fontconfig/src/fccfg.c
@@ -471,7 +471,7 @@ FcConfigAddCacheDir (FcConfig *config,
}
FcStrList *
-FcConfigGetCacheDirs (FcConfig *config)
+FcConfigGetCacheDirs (const FcConfig *config)
{
if (!config)
{
diff --git a/fontconfig/src/fcint.h b/fontconfig/src/fcint.h
index 1e39fecd1..e45df5351 100644
--- a/fontconfig/src/fcint.h
+++ b/fontconfig/src/fcint.h
@@ -544,6 +544,9 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
FcPrivate FcBool
FcDirCacheWrite (FcCache *cache, FcConfig *config);
+FcPrivate FcBool
+FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
+
FcPrivate void
FcCacheObjectReference (void *object);
diff --git a/fontconfig/src/fcstr.c b/fontconfig/src/fcstr.c
index a6f0ba766..ae37ff00a 100644
--- a/fontconfig/src/fcstr.c
+++ b/fontconfig/src/fcstr.c
@@ -306,7 +306,7 @@ _FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex, int cflags, int eflags)
return ret == 0 ? FcTrue : FcFalse;
}
#else
-# define _FcStrRegexCmp(_s_, _regex_) (FcFalse)
+# define _FcStrRegexCmp(_s_, _regex_, _cflags_, _eflags_) (FcFalse)
#endif
FcBool
diff --git a/libXau/AuFileName.c b/libXau/AuFileName.c
index 4419070bc..bc7b177db 100644
--- a/libXau/AuFileName.c
+++ b/libXau/AuFileName.c
@@ -1,72 +1,87 @@
-/*
-
-Copyright 1988, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <X11/Xauth.h>
-#include <X11/Xos.h>
-#include <stdlib.h>
-
-char *
-XauFileName (void)
-{
- const char *slashDotXauthority = "/.Xauthority";
- char *name;
- static char *buf;
- static int bsize;
-#ifdef WIN32
- char dir[128];
-#endif
- int size;
-
- if ((name = getenv ("XAUTHORITY")))
- return name;
- name = getenv ("HOME");
- if (!name) {
-#ifdef WIN32
- (void) strcpy (dir, "/users/");
- if ((name = getenv("USERNAME"))) {
- (void) strcat (dir, name);
- name = dir;
- }
- if (!name)
-#endif
- return NULL;
- }
- size = strlen (name) + strlen(&slashDotXauthority[1]) + 2;
- if (size > bsize) {
- if (buf)
- free (buf);
- buf = malloc ((unsigned) size);
- if (!buf)
- return NULL;
- bsize = size;
- }
- strcpy (buf, name);
- strcat (buf, slashDotXauthority + (name[1] == '\0' ? 1 : 0));
- return buf;
-}
+/*
+
+Copyright 1988, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <X11/Xauth.h>
+#include <X11/Xos.h>
+#include <stdlib.h>
+
+static char *buf = NULL;
+
+static void
+free_filename_buffer(void)
+{
+ free(buf);
+ buf = NULL;
+}
+
+char *
+XauFileName (void)
+{
+ const char *slashDotXauthority = "/.Xauthority";
+ char *name;
+ static int bsize;
+ static int atexit_registered = 0;
+#ifdef WIN32
+ char dir[128];
+#endif
+ int size;
+
+ if ((name = getenv ("XAUTHORITY")))
+ return name;
+ name = getenv ("HOME");
+ if (!name) {
+#ifdef WIN32
+ (void) strcpy (dir, "/users/");
+ if ((name = getenv("USERNAME"))) {
+ (void) strcat (dir, name);
+ name = dir;
+ }
+ if (!name)
+#endif
+ return NULL;
+ }
+ size = strlen (name) + strlen(&slashDotXauthority[1]) + 2;
+ if (size > bsize) {
+ if (buf)
+ free (buf);
+ buf = malloc ((unsigned) size);
+ if (!buf)
+ return NULL;
+
+ if (!atexit_registered) {
+ atexit(free_filename_buffer);
+ atexit_registered = 1;
+ }
+
+ bsize = size;
+ }
+ strcpy (buf, name);
+ strcat (buf, slashDotXauthority + (name[1] == '\0' ? 1 : 0));
+ return buf;
+}
diff --git a/libXext/include/X11/extensions/sync.h b/libXext/include/X11/extensions/sync.h
index d3a239f66..31b1be064 100644
--- a/libXext/include/X11/extensions/sync.h
+++ b/libXext/include/X11/extensions/sync.h
@@ -203,7 +203,7 @@ typedef struct {
} XSyncCounterNotifyEvent;
typedef struct {
- int type; /* event base + XSyncCounterNotify */
+ int type; /* event base + XSyncAlarmNotify */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
diff --git a/libXext/src/Xge.c b/libXext/src/Xge.c
index 74e48020a..1f37e596d 100644
--- a/libXext/src/Xge.c
+++ b/libXext/src/Xge.c
@@ -218,7 +218,15 @@ _xgeDpyClose(Display* dpy, XExtCodes* codes)
XFree(xge_data);
}
- return XextRemoveDisplay(xge_info, dpy);
+ if(!XextRemoveDisplay(xge_info, dpy))
+ return 0;
+
+ if (xge_info->ndisplays == 0) {
+ XextDestroyExtension(xge_info);
+ xge_info = NULL;
+ }
+
+ return 1;
}
/*
diff --git a/libxcb/src/xcb_util.c b/libxcb/src/xcb_util.c
index 6b931c2d0..065fe1407 100644
--- a/libxcb/src/xcb_util.c
+++ b/libxcb/src/xcb_util.c
@@ -182,7 +182,7 @@ static int _xcb_open(const char *host, char *protocol, const int display)
if(strncmp(host, "/tmp/launch", 11) == 0) {
base = host;
host = "";
- protocol = NULL;
+ protocol = "unix";
}
#endif
diff --git a/mesalib/docs/viewperf.html b/mesalib/docs/viewperf.html
index 1005eae48..279625046 100644
--- a/mesalib/docs/viewperf.html
+++ b/mesalib/docs/viewperf.html
@@ -32,6 +32,10 @@ These issues have been reported to the SPEC organization in the hope that
they'll be fixed in the future.
</p>
+<p>
+Some of the Viewperf tests use a lot of memory.
+At least 2GB of RAM is recommended.
+</p>
<h2>Catia-03 test 2</h2>
diff --git a/mesalib/src/mapi/glapi/glapi_gentable.c b/mesalib/src/mapi/glapi/glapi_gentable.c
index cc083d985..7552af252 100644
--- a/mesalib/src/mapi/glapi/glapi_gentable.c
+++ b/mesalib/src/mapi/glapi/glapi_gentable.c
@@ -105,7 +105,7 @@ __glapi_gentable_set_remaining_noop(struct _glapi_table *disp) {
struct _glapi_table *
_glapi_create_table_from_handle(void *handle, const char *symbol_prefix) {
- struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table));
+ struct _glapi_table *disp = calloc(_glapi_get_dispatch_table_size(), sizeof(void *));
char symboln[512];
if(!disp)
diff --git a/mesalib/src/mesa/main/arrayobj.c b/mesalib/src/mesa/main/arrayobj.c
index c7584d903..4c50066de 100644
--- a/mesalib/src/mesa/main/arrayobj.c
+++ b/mesalib/src/mesa/main/arrayobj.c
@@ -389,7 +389,6 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
}
ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= VERT_BIT_ALL;
_mesa_reference_array_object(ctx, &ctx->Array.ArrayObj, newObj);
/* Pass BindVertexArray call to device driver */
diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c
index 9b90b05f7..b114ec941 100644
--- a/mesalib/src/mesa/main/attrib.c
+++ b/mesalib/src/mesa/main/attrib.c
@@ -1447,13 +1447,6 @@ restore_array_attrib(struct gl_context *ctx,
|| _mesa_IsBufferARB(src->ArrayObj->ElementArrayBufferObj->Name))
_mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB,
src->ArrayObj->ElementArrayBufferObj->Name);
-
- /* FIXME: Should some bits in ctx->Array->NewState also be set
- * FIXME: here? It seems like it should be set to inclusive-or
- * FIXME: of the old ArrayObj->_Enabled and the new _Enabled.
- * ... just do it.
- */
- dest->NewState |= src->ArrayObj->_Enabled | dest->ArrayObj->_Enabled;
}
/**
diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c
index f6d37feae..d0b462580 100644
--- a/mesalib/src/mesa/main/enable.c
+++ b/mesalib/src/mesa/main/enable.c
@@ -142,7 +142,6 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_ARRAY);
- ctx->Array.NewState |= flag;
_ae_invalidate_state(ctx, _NEW_ARRAY);
@@ -153,6 +152,8 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
else
arrayObj->_Enabled &= ~flag;
+ arrayObj->NewArrays |= flag;
+
if (ctx->Driver.Enable) {
ctx->Driver.Enable( ctx, cap, state );
}
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index f277307a8..2b709ded6 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -1599,6 +1599,9 @@ struct gl_array_object
/** Mask of VERT_BIT_* values indicating which arrays are enabled */
GLbitfield64 _Enabled;
+ /** Mask of VERT_BIT_* values indicating changed/dirty arrays */
+ GLbitfield64 NewArrays;
+
/**
* Min of all enabled arrays' _MaxElement. When arrays reside inside VBOs
* we can determine the max legal (in bounds) glDrawElements array index.
@@ -1631,8 +1634,6 @@ struct gl_array_attrib
GLboolean PrimitiveRestart;
GLuint RestartIndex;
- GLbitfield64 NewState; /**< mask of VERT_BIT_* values */
-
/* GL_ARB_vertex_buffer_object */
struct gl_buffer_object *ArrayBufferObj;
};
diff --git a/mesalib/src/mesa/main/state.c b/mesalib/src/mesa/main/state.c
index f82e4a25e..db0cc30ec 100644
--- a/mesalib/src/mesa/main/state.c
+++ b/mesalib/src/mesa/main/state.c
@@ -580,7 +580,7 @@ _mesa_update_state_locked( struct gl_context *ctx )
new_state = ctx->NewState | new_prog_state;
ctx->NewState = 0;
ctx->Driver.UpdateState(ctx, new_state);
- ctx->Array.NewState = 0;
+ ctx->Array.ArrayObj->NewArrays = 0x0;
}
diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c
index 1c1484323..efa63b07c 100644
--- a/mesalib/src/mesa/main/varray.c
+++ b/mesalib/src/mesa/main/varray.c
@@ -221,7 +221,7 @@ update_array(struct gl_context *ctx,
ctx->Array.ArrayBufferObj);
ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= VERT_BIT(attrib);
+ ctx->Array.ArrayObj->NewArrays |= VERT_BIT(attrib);
}
@@ -502,7 +502,7 @@ _mesa_EnableVertexAttribArrayARB(GLuint index)
FLUSH_VERTICES(ctx, _NEW_ARRAY);
arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_TRUE;
arrayObj->_Enabled |= VERT_BIT_GENERIC(index);
- ctx->Array.NewState |= VERT_BIT_GENERIC(index);
+ arrayObj->NewArrays |= VERT_BIT_GENERIC(index);
}
}
@@ -529,7 +529,7 @@ _mesa_DisableVertexAttribArrayARB(GLuint index)
FLUSH_VERTICES(ctx, _NEW_ARRAY);
arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_FALSE;
arrayObj->_Enabled &= ~VERT_BIT_GENERIC(index);
- ctx->Array.NewState |= VERT_BIT_GENERIC(index);
+ arrayObj->NewArrays |= VERT_BIT_GENERIC(index);
}
}
@@ -1001,7 +1001,6 @@ _mesa_LockArraysEXT(GLint first, GLsizei count)
ctx->Array.LockCount = count;
ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= VERT_BIT_ALL;
}
@@ -1022,7 +1021,6 @@ _mesa_UnlockArraysEXT( void )
ctx->Array.LockFirst = 0;
ctx->Array.LockCount = 0;
ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= VERT_BIT_ALL;
}
@@ -1138,7 +1136,7 @@ _mesa_VertexAttribDivisor(GLuint index, GLuint divisor)
if (array->InstanceDivisor != divisor) {
FLUSH_VERTICES(ctx, _NEW_ARRAY);
array->InstanceDivisor = divisor;
- ctx->Array.NewState |= VERT_BIT(VERT_ATTRIB_GENERIC(index));
+ ctx->Array.ArrayObj->NewArrays |= VERT_BIT(VERT_ATTRIB_GENERIC(index));
}
}
diff --git a/pixman/pixman/pixman-bits-image.c b/pixman/pixman/pixman-bits-image.c
index d105d2f69..1f6897c2c 100644
--- a/pixman/pixman/pixman-bits-image.c
+++ b/pixman/pixman/pixman-bits-image.c
@@ -381,11 +381,11 @@ bits_image_fetch_pixel_convolution (bits_image_t *image,
int y_off = (params[1] - pixman_fixed_1) >> 1;
int32_t cwidth = pixman_fixed_to_int (params[0]);
int32_t cheight = pixman_fixed_to_int (params[1]);
- int32_t srtot, sgtot, sbtot, satot;
int32_t i, j, x1, x2, y1, y2;
pixman_repeat_t repeat_mode = image->common.repeat;
int width = image->width;
int height = image->height;
+ int srtot, sgtot, sbtot, satot;
params += 2;
@@ -421,10 +421,10 @@ bits_image_fetch_pixel_convolution (bits_image_t *image,
pixel = get_pixel (image, rx, ry, TRUE);
}
- srtot += RED_8 (pixel) * f;
- sgtot += GREEN_8 (pixel) * f;
- sbtot += BLUE_8 (pixel) * f;
- satot += ALPHA_8 (pixel) * f;
+ srtot += (int)RED_8 (pixel) * f;
+ sgtot += (int)GREEN_8 (pixel) * f;
+ sbtot += (int)BLUE_8 (pixel) * f;
+ satot += (int)ALPHA_8 (pixel) * f;
}
params++;
diff --git a/pixman/test/utils.c b/pixman/test/utils.c
index cc0365aa2..c1bf6dc2c 100644
--- a/pixman/test/utils.c
+++ b/pixman/test/utils.c
@@ -358,9 +358,16 @@ a8r8g8b8_to_rgba_np (uint32_t *dst, uint32_t *src, int n_pixels)
if (a != 0)
{
- r = (r * 255) / a;
- g = (g * 255) / a;
- b = (b * 255) / a;
+#define DIVIDE(c, a) \
+ do \
+ { \
+ int t = ((c) * 255) / a; \
+ (c) = t < 0? 0 : t > 255? 255 : t; \
+ } while (0)
+
+ DIVIDE (r, a);
+ DIVIDE (g, a);
+ DIVIDE (b, a);
}
*dst8++ = r;