SOURCES: php4-gd.patch (NEW) - backport of threading fixes from ph...
arekm
arekm at pld-linux.org
Wed May 30 21:12:15 CEST 2007
Author: arekm Date: Wed May 30 19:12:15 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- backport of threading fixes from php5.2 bundled gd
---- Files affected:
SOURCES:
php4-gd.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/php4-gd.patch
diff -u /dev/null SOURCES/php4-gd.patch:1.1
--- /dev/null Wed May 30 21:12:15 2007
+++ SOURCES/php4-gd.patch Wed May 30 21:12:10 2007
@@ -0,0 +1,77 @@
+--- php-4.4.7/ext/gd/libgd/gdft.c 2007-03-10 13:51:07.000000000 +0100
++++ php-4.4.7.org/ext/gd/libgd/gdft.c 2007-05-30 21:08:19.917066032 +0200
+@@ -750,10 +750,8 @@
+ /* find antialised color */
+
+ tc_key.bgcolor = *pixel;
+- gdMutexLock(gdFontCacheMutex);
+ tc_elem = (tweencolor_t *) gdCacheGet (tc_cache, &tc_key);
+ *pixel = tc_elem->tweencolor;
+- gdMutexUnlock(gdFontCacheMutex);
+ }
+ }
+ }
+@@ -771,30 +769,39 @@
+
+ void gdFontCacheShutdown()
+ {
++ gdMutexLock(gdFontCacheMutex);
++
+ if (fontCache) {
+- gdMutexLock(gdFontCacheMutex);
+ gdCacheDelete(fontCache);
+ fontCache = NULL;
+- gdMutexUnlock(gdFontCacheMutex);
+- gdMutexShutdown(gdFontCacheMutex);
+ FT_Done_FreeType(library);
+ }
++
++ gdMutexUnlock(gdFontCacheMutex);
+ }
+
+ void gdFreeFontCache()
+ {
+ gdFontCacheShutdown();
+ }
+-
++
++void gdFontCacheMutexSetup()
++{
++ gdMutexSetup(gdFontCacheMutex);
++}
++
++void gdFontCacheMutexShutdown()
++{
++ gdMutexShutdown(gdFontCacheMutex);
++}
++
+ int gdFontCacheSetup(void)
+ {
+ if (fontCache) {
+ /* Already set up */
+ return 0;
+ }
+- gdMutexSetup(gdFontCacheMutex);
+ if (FT_Init_FreeType(&library)) {
+- gdMutexShutdown(gdFontCacheMutex);
+ return -1;
+ }
+ fontCache = gdCacheCreate (FONTCACHESIZE, fontTest, fontFetch, fontRelease);
+@@ -856,15 +863,16 @@
+
+ /***** initialize font library and font cache on first call ******/
+
++ gdMutexLock(gdFontCacheMutex);
+ if (!fontCache) {
+ if (gdFontCacheSetup() != 0) {
+ gdCacheDelete(tc_cache);
++ gdMutexUnlock(gdFontCacheMutex);
+ return "Failure to initialize font library";
+ }
+ }
+ /*****/
+
+- gdMutexLock(gdFontCacheMutex);
+ /* get the font (via font cache) */
+ fontkey.fontlist = fontlist;
+ fontkey.library = &library;
================================================================
More information about the pld-cvs-commit
mailing list