summaryrefslogtreecommitdiffstats
path: root/third_party/talloc/compat
diff options
context:
space:
mode:
authorkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-25 22:47:51 +0000
committerkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-25 22:47:51 +0000
commit1a7f66eb16724be2fe195ed62141b86dd63168b1 (patch)
tree8aaeced09377f3633977787a63f7f1998100bbb8 /third_party/talloc/compat
parent86a5293ac4571cffb0c7bb7f2da50f91ce6db829 (diff)
downloadchromium_src-1a7f66eb16724be2fe195ed62141b86dd63168b1.zip
chromium_src-1a7f66eb16724be2fe195ed62141b86dd63168b1.tar.gz
chromium_src-1a7f66eb16724be2fe195ed62141b86dd63168b1.tar.bz2
Upgraded Mesa to 7.9 from 7.7 in order to pick up bug fixes to the
shader compiler which were causing WebGL test timeouts per https://bugs.webkit.org/show_bug.cgi?id=47243 . Version 7.8.2 was too buggy to use. This upgrade required the incorporation of the talloc library, which is only compiled in to the OSMesa shared object produced by third_party/mesa/mesa.gyp and not into the rest of Chromium. Upgraded mesa.gyp for the new source directories and files in Mesa 7.9. Applied the changes originally documented in third_party/mesa/README.chromium to the 7.9 sources. Made other necessary changes to Mesa and talloc to be able to build and run them on Windows and Mac OS X. Created chromium.patch files for both Mesa and talloc. Fixed chrome/gpu/gpu_main.cc to honor the --use-gl command line option on Linux. Tested on Linux in Chromium with CSS 3D content and --use-gl=osmesa as well as in DumpRenderTree and verified that the affected WebGL tests no longer hang. Tested on Windows in Chromium with WebGL content and --use-gl=osmesa. Tested on Mac OS X in test_shell with WebGL content. This job was explicitly not sent to the try bots because it would probably kill them. The files in this CL are a small subset of the files being committed. The patch is too large to upload to Rietveld. BUG=none TEST=none Review URL: http://codereview.chromium.org/4107001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/talloc/compat')
-rw-r--r--third_party/talloc/compat/talloc_compat1.c51
-rw-r--r--third_party/talloc/compat/talloc_compat1.m414
2 files changed, 65 insertions, 0 deletions
diff --git a/third_party/talloc/compat/talloc_compat1.c b/third_party/talloc/compat/talloc_compat1.c
new file mode 100644
index 0000000..519e8c3
--- /dev/null
+++ b/third_party/talloc/compat/talloc_compat1.c
@@ -0,0 +1,51 @@
+/*
+ Samba trivial allocation library - compat functions
+
+ Copyright (C) Stefan Metzmacher 2009
+
+ ** NOTE! The following LGPL license applies to the talloc
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * This file contains only function to build a
+ * compat talloc.so.1 library on top of talloc.so.2
+ */
+
+#include "replace.h"
+#include "talloc.h"
+
+void *_talloc_reference(const void *context, const void *ptr);
+void *_talloc_reference(const void *context, const void *ptr) {
+ return _talloc_reference_loc(context, ptr,
+ "Called from talloc compat1 "
+ "_talloc_reference");
+}
+
+void *_talloc_steal(const void *new_ctx, const void *ptr);
+void *_talloc_steal(const void *new_ctx, const void *ptr)
+{
+ return talloc_reparent(talloc_parent(ptr), new_ctx, ptr);
+}
+
+#undef talloc_free
+int talloc_free(void *ptr);
+int talloc_free(void *ptr)
+{
+ return talloc_unlink(talloc_parent(ptr), ptr);
+}
+
diff --git a/third_party/talloc/compat/talloc_compat1.m4 b/third_party/talloc/compat/talloc_compat1.m4
new file mode 100644
index 0000000..2ec530e
--- /dev/null
+++ b/third_party/talloc/compat/talloc_compat1.m4
@@ -0,0 +1,14 @@
+TALLOC_COMPAT1_MK=""
+AC_SUBST(TALLOC_COMPAT1_MK)
+
+AC_ARG_ENABLE(talloc-compat1,
+ [AS_HELP_STRING([--enable-talloc-compat1],
+ [Build talloc 1.x.x compat library [default=no]])],
+ [ enable_talloc_compat1=$enableval ],
+ [ enable_talloc_compat1=no ]
+)
+
+if test "x$enable_talloc_compat1" = x"yes"; then
+ TALLOC_COMPAT1_MK='include $(tallocdir)/compat/talloc_compat1.mk'
+fi
+