[meta-freescale] [meta-fsl-arm][PATCH v2] chromium: Add bbappend for GPU specific modifications and VPU support

Carlos Rafael Giani dv at pseudoterminal.org
Sun Aug 24 12:39:48 PDT 2014


* Adds ozone-wayland patches which modify the required EGL versions in
  the GYP files
* Turns on h.264 and MP4 support in Chromium's FFmpeg copy
* Enables a workaround for the Vivante GPU that prevents translucent
  canvas regions to show up with a blue color
* Adds hardware-accelerated video decoding using the VPU by fetching
  chromium-imx sources and integrating them into the Chromium source tree
  and the GYP files

Signed-off-by: Carlos Rafael Giani <dv at pseudoterminal.org>
---
 .../recipes-browser/chromium/chromium-imx.inc      | 48 ++++++++++++++++++++++
 .../chromium/chromium_35.0.1916.114.bbappend       |  4 ++
 .../chromium/chromium_37.0.2062.0.bbappend         |  5 +++
 3 files changed, 57 insertions(+)
 create mode 100644 browser-layer/recipes-browser/chromium/chromium-imx.inc
 create mode 100644 browser-layer/recipes-browser/chromium/chromium_35.0.1916.114.bbappend
 create mode 100644 browser-layer/recipes-browser/chromium/chromium_37.0.2062.0.bbappend

diff --git a/browser-layer/recipes-browser/chromium/chromium-imx.inc b/browser-layer/recipes-browser/chromium/chromium-imx.inc
new file mode 100644
index 0000000..b204d0d
--- /dev/null
+++ b/browser-layer/recipes-browser/chromium/chromium-imx.inc
@@ -0,0 +1,48 @@
+DEPENDS_append = " libfslvpuwrap"
+
+# Additional imx code and patches are included in the chromium-imx git repository.
+# The code below fetches this repository, copies the extra source over to the main
+# chromium source directory, and applies the patches.
+
+CHROMIUM_IMX_BRANCH = "master"
+CHROMIUM_IMX_SRCREV = "0aacc892d0977f691d683db1c1f1f6f9e33da911"
+CHROMIUM_IMX_DESTSUFFIX = "chromium-imx-git"
+
+PATCH_BASE_DIR = "${WORKDIR}/${CHROMIUM_IMX_DESTSUFFIX}/patches"
+
+CHROMIUM_IMX_COMMON_PATCHES ?= " "
+CHROMIUM_IMX_WAYLAND_PATCHES ?= " "
+
+SRC_URI += "git://github.com/Freescale/chromium-imx.git;destsuffix=${CHROMIUM_IMX_DESTSUFFIX};branch=${CHROMIUM_IMX_BRANCH};rev=${CHROMIUM_IMX_SRCREV}"
+
+do_unpack[postfuncs] += "copy_chromium_imx_files"
+# using =+ instead of += to make sure add_chromium_imx_patches is
+# executed before add_ozone_wayland_patches in the main recipe;
+# this is necessary because add_chromium_imx_patches appends
+# patches to the OZONE_WAYLAND_EXTRA_PATCHES variable
+do_patch[prefuncs] =+ "add_chromium_imx_patches"
+
+# * component build is on by default to reduce memory usage while compiling and to
+#   make it easier to patch binaries on the targets if necessary
+# * Lost context problems are not known to happen with Vivante GPUs,
+#   so it is safe to use ignore-lost-context
+# * EGL is on by default due to the GPU on the i.MX6
+PACKAGECONFIG_append = " component-build use-egl ignore-lost-context"
+
+copy_chromium_imx_files() {
+	# sources in src/ are already organized in a manner
+	# that matches the subdirectories in the chromium
+	# source directory; just copy over the files in src/
+	cp -r ${WORKDIR}/chromium-imx-git/src/* ${S}/
+}
+
+python add_chromium_imx_patches() {
+    d.appendVar('SRC_URI', ' ' + d.getVar('CHROMIUM_IMX_COMMON_PATCHES', 1))
+    d.appendVar('OZONE_WAYLAND_EXTRA_PATCHES', ' ' + d.getVar('CHROMIUM_IMX_WAYLAND_PATCHES', 1))
+}
+
+# Necessary flags to enable support for h.264 and MP4 in Chromium
+# (Parsing is done by ffmpeg)
+EXTRA_OEGYP += "-Dproprietary_codecs=1 -Dffmpeg_branding=Chrome"
+
+COMPATIBLE_MACHINE = "(mx6)"
diff --git a/browser-layer/recipes-browser/chromium/chromium_35.0.1916.114.bbappend b/browser-layer/recipes-browser/chromium/chromium_35.0.1916.114.bbappend
new file mode 100644
index 0000000..561aec2
--- /dev/null
+++ b/browser-layer/recipes-browser/chromium/chromium_35.0.1916.114.bbappend
@@ -0,0 +1,4 @@
+include chromium-imx.inc
+
+CHROMIUM_IMX_COMMON_PATCHES += "file://${PATCH_BASE_DIR}/common/0001-Enable-share-group-workaround-for-Vivante-GPUs.patch \
+                                file://${PATCH_BASE_DIR}/common/0002-Add-VPU-video-decode-accelerator-to-Chromium-35-GPU-.patch"
diff --git a/browser-layer/recipes-browser/chromium/chromium_37.0.2062.0.bbappend b/browser-layer/recipes-browser/chromium/chromium_37.0.2062.0.bbappend
new file mode 100644
index 0000000..1eb6490
--- /dev/null
+++ b/browser-layer/recipes-browser/chromium/chromium_37.0.2062.0.bbappend
@@ -0,0 +1,5 @@
+include chromium-imx.inc
+
+CHROMIUM_IMX_COMMON_PATCHES += "file://${PATCH_BASE_DIR}/common/0001-Enable-share-group-workaround-for-Vivante-GPUs.patch \
+                                file://${PATCH_BASE_DIR}/common/0002-Add-VPU-video-decode-accelerator-to-Chromium-37-GPU-.patch"
+CHROMIUM_IMX_WAYLAND_PATCHES += "file://${PATCH_BASE_DIR}/wayland/0001-Modify-eglwayland-versions-for-Vivante-GPUs.patch"
-- 
1.8.3.2



More information about the meta-freescale mailing list