summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-11-01 11:28:45 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-01 17:27:41 +0100
commitb8e0860da9a4b3949d0801a9491781a56cead438 (patch)
tree768a1aa13cbf53682cf5f123c322a74d3c2a45fc /patches
parent2b9354c5399eeb538f31b1afc20b6d54f455bfcb (diff)
Add patch: Fix the build with a GL ES2 configured Qt.
Change-Id: Ice94e3cefca317573db3492dd6622d20f4b6e00a Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'patches')
-rw-r--r--patches/0001-Fix-the-build-with-a-GL-ES2-configured-Qt.patch164
-rwxr-xr-xpatches/patch-chromium.sh1
2 files changed, 165 insertions, 0 deletions
diff --git a/patches/0001-Fix-the-build-with-a-GL-ES2-configured-Qt.patch b/patches/0001-Fix-the-build-with-a-GL-ES2-configured-Qt.patch
new file mode 100644
index 000000000..cb0652f87
--- /dev/null
+++ b/patches/0001-Fix-the-build-with-a-GL-ES2-configured-Qt.patch
@@ -0,0 +1,164 @@
+From 65f72f14be2902840e0a478be640aba168d0f15e Mon Sep 17 00:00:00 2001
+From: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+Date: Wed, 30 Oct 2013 14:27:28 +0100
+Subject: [PATCH] Fix the build with a GL ES2 configured Qt.
+
+GLES/gl2.h is included through Qt public headers and the copy of
+Chromium is used since its include path comes before /usr/include.
+The problem is that this header is incompatible for some reasons,
+one of them being that it converts all GL function symbols from
+gl* to GLES2*.
+
+Qt layer code should always need to go through GL directly,
+so make sure that only GYP targets that depend directly on gpu.gyp,
+khronos.gyp or webkit_gpu.gyp will have an include path
+pointing to those headers.
+
+Replace all_dependent_settings with direct_dependent_settings and
+control which target inherits this include_dirs from its dependencies
+by using export_dependent_settings.
+
+Change-Id: Id4d98fe22ef8b778b5ba8da300dad28e69507732
+---
+ content/content_browser.gypi | 1 +
+ gpu/command_buffer_client.gypi | 3 +++
+ gpu/command_buffer_common.gypi | 3 +++
+ gpu/gpu.gyp | 18 ++++++++++++++++++
+ third_party/khronos/khronos.gyp | 2 +-
+ webkit/common/gpu/webkit_gpu.gyp | 3 +++
+ 6 files changed, 29 insertions(+), 1 deletion(-)
+
+diff --git a/content/content_browser.gypi b/content/content_browser.gypi
+index 22d857a..8a37d91 100644
+--- a/content/content_browser.gypi
++++ b/content/content_browser.gypi
+@@ -1234,6 +1234,7 @@
+ 'dependencies': [
+ 'browser/devtools/devtools_resources.gyp:devtools_resources',
+ '../cc/cc.gyp:cc',
++ '../gpu/gpu.gyp:gpu_ipc',
+ '../net/net.gyp:http_server',
+ '../printing/printing.gyp:printing',
+ '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
+diff --git a/gpu/command_buffer_client.gypi b/gpu/command_buffer_client.gypi
+index b4d5b78..75bea79 100644
+--- a/gpu/command_buffer_client.gypi
++++ b/gpu/command_buffer_client.gypi
+@@ -14,6 +14,9 @@
+ 'dependencies': [
+ '../third_party/khronos/khronos.gyp:khronos_headers',
+ ],
++ 'export_dependent_settings': [
++ '../third_party/khronos/khronos.gyp:khronos_headers',
++ ],
+ 'sources': [
+ 'command_buffer/client/atomicops.cc',
+ 'command_buffer/client/atomicops.h',
+diff --git a/gpu/command_buffer_common.gypi b/gpu/command_buffer_common.gypi
+index 85431e4..f159355 100644
+--- a/gpu/command_buffer_common.gypi
++++ b/gpu/command_buffer_common.gypi
+@@ -6,6 +6,9 @@
+ 'dependencies': [
+ '../third_party/khronos/khronos.gyp:khronos_headers',
+ ],
++ 'export_dependent_settings': [
++ '../third_party/khronos/khronos.gyp:khronos_headers',
++ ],
+ 'sources': [
+ 'command_buffer/common/bitfield_helpers.h',
+ 'command_buffer/common/buffer.h',
+diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp
+index 316aa91..1599623 100644
+--- a/gpu/gpu.gyp
++++ b/gpu/gpu.gyp
+@@ -23,6 +23,9 @@
+ 'command_buffer/command_buffer.gyp:gles2_utils',
+ 'gles2_cmd_helper',
+ ],
++ 'export_dependent_settings': [
++ '../third_party/khronos/khronos.gyp:khronos_headers',
++ ],
+ 'defines': [
+ 'GLES2_IMPL_IMPLEMENTATION',
+ ],
+@@ -88,6 +91,9 @@
+ 'command_buffer_client',
+ 'gles2_implementation',
+ ],
++ 'export_dependent_settings': [
++ 'command_buffer_client',
++ ],
+ 'defines': [
+ 'GLES2_C_LIB_IMPLEMENTATION',
+ ],
+@@ -113,6 +119,9 @@
+ 'command_buffer_client',
+ 'gles2_implementation_client_side_arrays_no_check',
+ ],
++ 'export_dependent_settings': [
++ 'command_buffer_client',
++ ],
+ 'sources': [
+ '<@(gles2_c_lib_source_files)',
+ ],
+@@ -348,6 +357,9 @@
+ 'gpu_config',
+ 'gpu_ipc',
+ ],
++ 'export_dependent_settings': [
++ 'command_buffer_common',
++ ],
+ 'sources': [
+ 'gpu_export.h',
+ ],
+@@ -390,6 +402,9 @@
+ 'dependencies': [
+ 'command_buffer_common',
+ ],
++ 'export_dependent_settings': [
++ 'command_buffer_common',
++ ],
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [4267, ],
+ },
+@@ -415,6 +430,9 @@
+ 'dependencies': [
+ 'command_buffer_common',
+ ],
++ 'export_dependent_settings': [
++ 'command_buffer_common',
++ ],
+ },
+ {
+ 'target_name': 'gpu_config',
+diff --git a/third_party/khronos/khronos.gyp b/third_party/khronos/khronos.gyp
+index 8a85572..88130d2 100644
+--- a/third_party/khronos/khronos.gyp
++++ b/third_party/khronos/khronos.gyp
+@@ -7,7 +7,7 @@
+ {
+ 'target_name': 'khronos_headers',
+ 'type': 'none',
+- 'all_dependent_settings': {
++ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '.',
+ '../../gpu', # Contains GLES2/gl2chromium.h
+diff --git a/webkit/common/gpu/webkit_gpu.gyp b/webkit/common/gpu/webkit_gpu.gyp
+index 5390c9a..effc5b7 100644
+--- a/webkit/common/gpu/webkit_gpu.gyp
++++ b/webkit/common/gpu/webkit_gpu.gyp
+@@ -26,6 +26,9 @@
+ '<(DEPTH)/ui/gl/gl.gyp:gl',
+ '<(DEPTH)/ui/ui.gyp:ui',
+ ],
++ 'export_dependent_settings': [
++ '<(DEPTH)/gpu/gpu.gyp:gles2_implementation',
++ ],
+ 'sources': [
+ # This list contains all .h and .cc in gpu except for test code.
+ 'context_provider_in_process.cc',
+--
+1.8.4
+
diff --git a/patches/patch-chromium.sh b/patches/patch-chromium.sh
index a1debf416..510237a5a 100755
--- a/patches/patch-chromium.sh
+++ b/patches/patch-chromium.sh
@@ -67,6 +67,7 @@ git am $PATCH_DIR/0001-Build-files-necessary-for-touch-and-gestures.patch
git am $PATCH_DIR/0001-remove-Wno-deprecated-register-from-common.gypi.patch
git am $PATCH_DIR/0001-Solve-conflicts-when-including-both-QtOpenGL-headers.patch
git am $PATCH_DIR/0001-Do-not-forward-declare-UIResourceRequest-Identity-an.patch
+git am $PATCH_DIR/0001-Fix-the-build-with-a-GL-ES2-configured-Qt.patch
cd $CHROMIUM_SRC_DIR/third_party/WebKit
echo "Entering $PWD"