summaryrefslogtreecommitdiffstats
path: root/chromium/build/patches
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-11-02 09:58:32 +0000
committer Eric Hameleers <alien@slackware.com>2016-11-02 09:58:32 +0000
commit2201d1728ed093c3814830437c6b58b9f7c9c573 (patch)
treeef83b8737c69f40a8b4fad005aa45deacb32070d /chromium/build/patches
parent7070396a85ea0cb6a9cc0fd557221f3288b25dd2 (diff)
downloadasb-2201d1728ed093c3814830437c6b58b9f7c9c573.tar.gz
asb-2201d1728ed093c3814830437c6b58b9f7c9c573.tar.xz
chromium: rebased the vaapi patch against chromium-54.0.2840.90 sources
Diffstat (limited to 'chromium/build/patches')
-rw-r--r--chromium/build/patches/chromium_vaapi.patch650
1 files changed, 193 insertions, 457 deletions
diff --git a/chromium/build/patches/chromium_vaapi.patch b/chromium/build/patches/chromium_vaapi.patch
index 05b2fe52..6d9ae5cc 100644
--- a/chromium/build/patches/chromium_vaapi.patch
+++ b/chromium/build/patches/chromium_vaapi.patch
@@ -1,21 +1,14 @@
-Taken from:
-https://aur.archlinux.org/cgit/aur.git/tree/?h=chromium-vaapi
-
---------
-
Originally from https://raw.githubusercontent.com/saiarcot895/chromium-ubuntu-build/master/debian/patches/enable_vaapi_on_linux.diff
Thanks to Saikrishna Arcot (saiarcot895)
-Refactored for Chromium 53 by Samantha McVey (samcv) samantham@posteo.net
+Refactored for Chromium 54 by Eric Hameleers <alien@slackware.com>
-Description: Enables using VA-API hardware acceleration in Linux. The patch for
-bpf_gpu_policy_linux.cc initially came from
-https://codereview.chromium.org/15955009/diff/92001/content/common/sandbox_linux/bpf_gpu_policy_linux.cc.
+Description: Enables using VA-API hardware acceleration in Linux. The patch for bpf_gpu_policy_linux.cc initially came from https://codereview.chromium.org/15955009/diff/92001/content/common/sandbox_linux/bpf_gpu_policy_linux.cc.
-diff -aur chromium-53.0.2785.89.orig/chrome/browser/about_flags.cc chromium-53.0.2785.89/chrome/browser/about_flags.cc
---- chromium-53.0.2785.89.orig/chrome/browser/about_flags.cc 2016-08-31 15:03:27.000000000 -0700
-+++ chromium-53.0.2785.89/chrome/browser/about_flags.cc 2016-09-02 01:35:26.221664850 -0700
-@@ -931,7 +931,7 @@
+diff -uar chromium-54.0.2840.90.orig/chrome/browser/about_flags.cc chromium-54.0.2840.90/chrome/browser/about_flags.cc
+--- chromium-54.0.2840.90.orig/chrome/browser/about_flags.cc 2016-11-01 21:59:07.000000000 +0100
++++ chromium-54.0.2840.90/chrome/browser/about_flags.cc 2016-11-02 10:42:04.629114886 +0100
+@@ -968,7 +968,7 @@
"disable-accelerated-video-decode",
IDS_FLAGS_ACCELERATED_VIDEO_DECODE_NAME,
IDS_FLAGS_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
@@ -24,13 +17,13 @@ diff -aur chromium-53.0.2785.89.orig/chrome/browser/about_flags.cc chromium-53.0
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
#if defined(USE_ASH)
-diff -aur chromium-53.0.2785.89.orig/content/common/BUILD.gn chromium-53.0.2785.89/content/common/BUILD.gn
---- chromium-53.0.2785.89.orig/content/common/BUILD.gn 2016-08-31 15:03:31.000000000 -0700
-+++ chromium-53.0.2785.89/content/common/BUILD.gn 2016-09-02 01:35:26.224998192 -0700
+diff -uar chromium-54.0.2840.90.orig/content/common/BUILD.gn chromium-54.0.2840.90/content/common/BUILD.gn
+--- chromium-54.0.2840.90.orig/content/common/BUILD.gn 2016-11-01 21:59:11.000000000 +0100
++++ chromium-54.0.2840.90/content/common/BUILD.gn 2016-11-02 10:42:04.630115037 +0100
@@ -12,6 +12,49 @@
import("//build/config/mac/mac_sdk.gni")
}
-
+
+if ((is_desktop_linux || is_chromeos) && current_cpu != "arm") {
+ action("libva_generate_stubs") {
+ extra_header = "../../media/gpu/va_stub_header.fragment"
@@ -77,8 +70,8 @@ diff -aur chromium-53.0.2785.89.orig/content/common/BUILD.gn chromium-53.0.2785.
source_set("common") {
# Targets external to content should always link to the public API.
# In addition, targets outside of the content component (shell and tests)
-@@ -183,6 +226,15 @@
-
+@@ -186,6 +229,15 @@
+
if (use_seccomp_bpf) {
defines += [ "USE_SECCOMP_BPF" ]
+ if (current_cpu != "arm" && is_desktop_linux) {
@@ -93,12 +86,12 @@ diff -aur chromium-53.0.2785.89.orig/content/common/BUILD.gn chromium-53.0.2785.
} else {
if (is_linux) {
sources -= [
-diff -aur chromium-53.0.2785.89.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc chromium-53.0.2785.89/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
---- chromium-53.0.2785.89.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-08-31 15:03:31.000000000 -0700
-+++ chromium-53.0.2785.89/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-09-02 01:35:26.224998192 -0700
-@@ -23,6 +23,12 @@
- #include "base/macros.h"
+diff -uar chromium-54.0.2840.90.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc chromium-54.0.2840.90/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+--- chromium-54.0.2840.90.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-11-01 21:59:11.000000000 +0100
++++ chromium-54.0.2840.90/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-11-02 10:42:04.631115188 +0100
+@@ -24,6 +24,12 @@
#include "base/memory/ptr_util.h"
+ #include "base/strings/stringprintf.h"
#include "build/build_config.h"
+
+#if !defined(__arm__)
@@ -109,10 +102,10 @@ diff -aur chromium-53.0.2785.89.orig/content/common/sandbox_linux/bpf_gpu_policy
#include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h"
#include "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h"
#include "content/common/set_process_title.h"
-@@ -34,6 +40,14 @@
+@@ -35,6 +41,14 @@
#include "sandbox/linux/syscall_broker/broker_process.h"
#include "sandbox/linux/system_headers/linux_syscalls.h"
-
+
+#if !defined(__arm__)
+#include "third_party/libva/va/va.h"
+#include "third_party/libva/va/va_x11.h"
@@ -124,10 +117,10 @@ diff -aur chromium-53.0.2785.89.orig/content/common/sandbox_linux/bpf_gpu_policy
using sandbox::arch_seccomp_data;
using sandbox::bpf_dsl::Allow;
using sandbox::bpf_dsl::ResultExpr;
-@@ -42,6 +56,16 @@
+@@ -43,6 +57,16 @@
using sandbox::syscall_broker::BrokerProcess;
using sandbox::SyscallSets;
-
+
+#if !defined(__arm__)
+using content_common::kModuleVa;
+using content_common::kModuleVa_x11;
@@ -139,10 +132,10 @@ diff -aur chromium-53.0.2785.89.orig/content/common/sandbox_linux/bpf_gpu_policy
+#endif
+
namespace content {
-
+
namespace {
-@@ -96,7 +120,7 @@
-
+@@ -97,7 +121,7 @@
+
bool IsAcceleratedVaapiVideoEncodeEnabled() {
bool accelerated_encode_enabled = false;
-#if defined(OS_CHROMEOS)
@@ -150,10 +143,10 @@ diff -aur chromium-53.0.2785.89.orig/content/common/sandbox_linux/bpf_gpu_policy
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
accelerated_encode_enabled =
-@@ -297,32 +321,72 @@
+@@ -295,32 +319,72 @@
GpuBrokerProcessPolicy::Create,
std::vector<BrokerFilePermission>()); // No extra files in whitelist.
-
+
+#if !defined(__arm__)
if (IsArchitectureX86_64() || IsArchitectureI386()) {
// Accelerated video dlopen()'s some shared objects
@@ -179,11 +172,11 @@ diff -aur chromium-53.0.2785.89.orig/content/common/sandbox_linux/bpf_gpu_policy
+ LOG(WARNING) << "Failed to initialize stubs";
+ return true;
}
-
-- dlopen(I965DrvVideoPath, RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE);
+
+- dlopen(I965DrvVideoPath, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
- if (I965HybridDrvVideoPath)
-- dlopen(I965HybridDrvVideoPath, RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE);
-- dlopen("libva.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE);
+- dlopen(I965HybridDrvVideoPath, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
+- dlopen("libva.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
+ // libva drivers won't get loaded even above two libraries get dlopened.
+ // Thus, libva calls will fail after post sandbox stage.
+ //
@@ -198,9 +191,9 @@ diff -aur chromium-53.0.2785.89.orig/content/common/sandbox_linux/bpf_gpu_policy
+
+ VADisplay va_display = NULL;
#if defined(USE_OZONE)
-- dlopen("libva-drm.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE);
+- dlopen("libva-drm.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
-#elif defined(USE_X11)
-- dlopen("libva-x11.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE);
+- dlopen("libva-x11.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
+ struct wl_display* wayland_display = wl_display_connect(NULL);
+ if (wayland_display) {
+ va_display = vaGetDisplayWl(wayland_display);
@@ -237,13 +230,14 @@ diff -aur chromium-53.0.2785.89.orig/content/common/sandbox_linux/bpf_gpu_policy
#endif
- }
- }
-
+
return true;
}
-diff -aur chromium-53.0.2785.89.orig/content/content_common.gypi chromium-53.0.2785.89/content/content_common.gypi
---- chromium-53.0.2785.89.orig/content/content_common.gypi 2016-08-31 15:03:31.000000000 -0700
-+++ chromium-53.0.2785.89/content/content_common.gypi 2016-09-02 01:35:26.224998192 -0700
-@@ -642,6 +642,52 @@
+Only in chromium-54.0.2840.90/content/common: va_wayland.sigs
+diff -uar chromium-54.0.2840.90.orig/content/content_common.gypi chromium-54.0.2840.90/content/content_common.gypi
+--- chromium-54.0.2840.90.orig/content/content_common.gypi 2016-11-01 21:59:11.000000000 +0100
++++ chromium-54.0.2840.90/content/content_common.gypi 2016-11-02 10:42:04.645117305 +0100
+@@ -631,6 +631,52 @@
],
}, {
'defines': ['USE_SECCOMP_BPF'],
@@ -296,10 +290,10 @@ diff -aur chromium-53.0.2785.89.orig/content/content_common.gypi chromium-53.0.2
}],
['use_ozone==1', {
'dependencies': [
-diff -aur chromium-53.0.2785.89.orig/content/content_gpu.gypi chromium-53.0.2785.89/content/content_gpu.gypi
---- chromium-53.0.2785.89.orig/content/content_gpu.gypi 2016-08-31 15:03:31.000000000 -0700
-+++ chromium-53.0.2785.89/content/content_gpu.gypi 2016-09-02 01:35:26.224998192 -0700
-@@ -49,7 +49,7 @@
+diff -uar chromium-54.0.2840.90.orig/content/content_gpu.gypi chromium-54.0.2840.90/content/content_gpu.gypi
+--- chromium-54.0.2840.90.orig/content/content_gpu.gypi 2016-11-01 21:59:11.000000000 +0100
++++ chromium-54.0.2840.90/content/content_gpu.gypi 2016-11-02 10:42:04.631115188 +0100
+@@ -47,7 +47,7 @@
],
},
}],
@@ -308,80 +302,68 @@ diff -aur chromium-53.0.2785.89.orig/content/content_gpu.gypi chromium-53.0.2785
'include_dirs': [
'<(DEPTH)/third_party/libva',
],
-diff -aur chromium-53.0.2785.89.orig/content/gpu/BUILD.gn chromium-53.0.2785.89/content/gpu/BUILD.gn
---- chromium-53.0.2785.89.orig/content/gpu/BUILD.gn 2016-08-31 15:03:31.000000000 -0700
-+++ chromium-53.0.2785.89/content/gpu/BUILD.gn 2016-09-02 01:35:26.224998192 -0700
-@@ -86,7 +86,7 @@
+diff -uar chromium-54.0.2840.90.orig/content/gpu/BUILD.gn chromium-54.0.2840.90/content/gpu/BUILD.gn
+--- chromium-54.0.2840.90.orig/content/gpu/BUILD.gn 2016-11-01 21:59:11.000000000 +0100
++++ chromium-54.0.2840.90/content/gpu/BUILD.gn 2016-11-02 10:42:04.631115188 +0100
+@@ -92,7 +92,7 @@
]
}
-
+
- if (is_chromeos && current_cpu != "arm") {
+ if ((is_desktop_linux || is_chromeos) && current_cpu != "arm") {
configs += [ "//third_party/libva:libva_config" ]
}
-
-diff -aur chromium-53.0.2785.89.orig/content/gpu/gpu_main.cc chromium-53.0.2785.89/content/gpu/gpu_main.cc
---- chromium-53.0.2785.89.orig/content/gpu/gpu_main.cc 2016-08-31 15:03:31.000000000 -0700
-+++ chromium-53.0.2785.89/content/gpu/gpu_main.cc 2016-09-02 01:35:26.224998192 -0700
-@@ -75,7 +75,7 @@
+
+diff -uar chromium-54.0.2840.90.orig/content/gpu/gpu_main.cc chromium-54.0.2840.90/content/gpu/gpu_main.cc
+--- chromium-54.0.2840.90.orig/content/gpu/gpu_main.cc 2016-11-01 21:59:11.000000000 +0100
++++ chromium-54.0.2840.90/content/gpu/gpu_main.cc 2016-11-02 10:42:04.631115188 +0100
+@@ -77,7 +77,7 @@
#include "content/common/sandbox_mac.h"
#endif
-
+
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
#include "media/gpu/vaapi_wrapper.h"
#endif
-
-@@ -253,7 +253,7 @@
+
+@@ -255,7 +255,7 @@
GetGpuInfoFromCommandLine(gpu_info, command_line);
gpu_info.in_process_gpu = false;
-
+
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
media::VaapiWrapper::PreSandboxInitialization();
#endif
-
-diff -aur chromium-53.0.2785.89.orig/content/public/common/content_switches.cc chromium-53.0.2785.89/content/public/common/content_switches.cc
---- chromium-53.0.2785.89.orig/content/public/common/content_switches.cc 2016-08-31 15:03:31.000000000 -0700
-+++ chromium-53.0.2785.89/content/public/common/content_switches.cc 2016-09-02 01:35:26.224998192 -0700
-@@ -973,7 +973,9 @@
+
+diff -uar chromium-54.0.2840.90.orig/content/public/common/content_switches.cc chromium-54.0.2840.90/content/public/common/content_switches.cc
+--- chromium-54.0.2840.90.orig/content/public/common/content_switches.cc 2016-11-01 21:59:12.000000000 +0100
++++ chromium-54.0.2840.90/content/public/common/content_switches.cc 2016-11-02 10:42:04.632115339 +0100
+@@ -1001,7 +1001,9 @@
#if defined(OS_CHROMEOS)
// Disables panel fitting (used for mirror mode).
const char kDisablePanelFitting[] = "disable-panel-fitting";
+#endif
-
+
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
// Disables VA-API accelerated video encode.
const char kDisableVaapiAcceleratedVideoEncode[] =
"disable-vaapi-accelerated-video-encode";
-diff -aur chromium-53.0.2785.89.orig/content/public/common/content_switches.h chromium-53.0.2785.89/content/public/common/content_switches.h
---- chromium-53.0.2785.89.orig/content/public/common/content_switches.h 2016-08-31 15:03:31.000000000 -0700
-+++ chromium-53.0.2785.89/content/public/common/content_switches.h 2016-09-02 01:35:26.224998192 -0700
-@@ -284,6 +284,8 @@
-
+diff -uar chromium-54.0.2840.90.orig/content/public/common/content_switches.h chromium-54.0.2840.90/content/public/common/content_switches.h
+--- chromium-54.0.2840.90.orig/content/public/common/content_switches.h 2016-11-01 21:59:12.000000000 +0100
++++ chromium-54.0.2840.90/content/public/common/content_switches.h 2016-11-02 10:42:04.632115339 +0100
+@@ -293,6 +293,8 @@
+
#if defined(OS_CHROMEOS)
CONTENT_EXPORT extern const char kDisablePanelFitting[];
+#endif
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
CONTENT_EXPORT extern const char kDisableVaapiAcceleratedVideoEncode[];
#endif
-
-diff -aur chromium-53.0.2785.89.orig/gpu/command_buffer/service/gpu_preferences.h chromium-53.0.2785.89/gpu/command_buffer/service/gpu_preferences.h
---- chromium-53.0.2785.89.orig/gpu/command_buffer/service/gpu_preferences.h 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/gpu/command_buffer/service/gpu_preferences.h 2016-09-02 01:35:26.221664850 -0700
-@@ -37,7 +37,7 @@
- // Disables hardware acceleration of video decode, where available.
- bool disable_accelerated_video_decode = false;
-
--#if defined(OS_CHROMEOS)
-+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
- // Disables VA-API accelerated video encode.
- bool disable_vaapi_accelerated_video_encode = false;
- #endif
-diff -aur chromium-53.0.2785.89.orig/gpu/config/software_rendering_list_json.cc chromium-53.0.2785.89/gpu/config/software_rendering_list_json.cc
---- chromium-53.0.2785.89.orig/gpu/config/software_rendering_list_json.cc 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/gpu/config/software_rendering_list_json.cc 2016-09-02 01:35:26.224998192 -0700
-@@ -431,17 +431,6 @@
+
+diff -uar chromium-54.0.2840.90.orig/gpu/config/software_rendering_list_json.cc chromium-54.0.2840.90/gpu/config/software_rendering_list_json.cc
+--- chromium-54.0.2840.90.orig/gpu/config/software_rendering_list_json.cc 2016-11-01 21:59:12.000000000 +0100
++++ chromium-54.0.2840.90/gpu/config/software_rendering_list_json.cc 2016-11-02 10:42:04.633115490 +0100
+@@ -415,17 +415,6 @@
]
},
{
@@ -399,51 +381,60 @@ diff -aur chromium-53.0.2785.89.orig/gpu/config/software_rendering_list_json.cc
"id": 50,
"description": "Disable VMware software renderer on older Mesa",
"cr_bugs": [145531, 332596, 571899],
-diff -aur chromium-53.0.2785.89.orig/media/BUILD.gn chromium-53.0.2785.89/media/BUILD.gn
---- chromium-53.0.2785.89.orig/media/BUILD.gn 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/BUILD.gn 2016-09-02 01:35:26.224998192 -0700
-@@ -353,7 +353,7 @@
+diff -uar chromium-54.0.2840.90.orig/media/BUILD.gn chromium-54.0.2840.90/media/BUILD.gn
+--- chromium-54.0.2840.90.orig/media/BUILD.gn 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/BUILD.gn 2016-11-02 10:42:04.633115490 +0100
+@@ -368,7 +368,7 @@
allow_circular_includes_from = [ "//media/base/android" ]
}
-
+
- if (current_cpu != "arm" && is_chromeos) {
+ if (current_cpu != "arm" && (is_chromeos || is_desktop_linux)) {
sources += [
"filters/h264_bitstream_buffer.cc",
"filters/h264_bitstream_buffer.h",
-@@ -650,7 +650,7 @@
+@@ -651,7 +651,7 @@
}
}
-
+
- if (current_cpu != "arm" && is_chromeos) {
+ if (current_cpu != "arm" && (is_chromeos || is_desktop_linux)) {
sources += [ "filters/h264_bitstream_buffer_unittest.cc" ]
}
-
-diff -aur chromium-53.0.2785.89.orig/media/gpu/BUILD.gn chromium-53.0.2785.89/media/gpu/BUILD.gn
---- chromium-53.0.2785.89.orig/media/gpu/BUILD.gn 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/BUILD.gn 2016-09-02 01:35:26.224998192 -0700
+
+diff -uar chromium-54.0.2840.90.orig/media/gpu/BUILD.gn chromium-54.0.2840.90/media/gpu/BUILD.gn
+--- chromium-54.0.2840.90.orig/media/gpu/BUILD.gn 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/gpu/BUILD.gn 2016-11-02 10:42:04.634115641 +0100
@@ -12,7 +12,7 @@
import("//build/config/mac/mac_sdk.gni")
}
-
+
-if (is_chromeos && current_cpu != "arm") {
-+if ((is_chromeos || is_linux) && current_cpu != "arm") {
++if ((is_desktop_linux || is_chromeos) && current_cpu != "arm") {
action("libva_generate_stubs") {
extra_header = "va_stub_header.fragment"
-
-@@ -54,7 +54,7 @@
+
+@@ -239,7 +239,7 @@
+ }
}
- }
-
--if (is_chromeos && use_v4lplugin) {
-+if ((is_chromeos || is_linux) && use_v4lplugin) {
- action("libv4l2_generate_stubs") {
- extra_header = "v4l2_stub_header.fragment"
-
-diff -aur chromium-53.0.2785.89.orig/media/gpu/gpu_video_decode_accelerator_factory_impl.cc chromium-53.0.2785.89/media/gpu/gpu_video_decode_accelerator_factory_impl.cc
---- chromium-53.0.2785.89.orig/media/gpu/gpu_video_decode_accelerator_factory_impl.cc 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/gpu_video_decode_accelerator_factory_impl.cc 2016-09-02 01:35:26.224998192 -0700
+
+- if (is_chromeos) {
++ if (is_linux) {
+ sources += [
+ "accelerated_video_decoder.h",
+ "h264_decoder.cc",
+@@ -282,7 +282,7 @@
+ "GLESv2",
+ ]
+ }
+- if (current_cpu == "arm") {
++ if (current_cpu == "arm" && is_chromeos) {
+ sources += [
+ "tegra_v4l2_device.cc",
+ "tegra_v4l2_device.h",
+diff -uar chromium-54.0.2840.90.orig/media/gpu/gpu_video_decode_accelerator_factory.cc chromium-54.0.2840.90/media/gpu/gpu_video_decode_accelerator_factory.cc
+--- chromium-54.0.2840.90.orig/media/gpu/gpu_video_decode_accelerator_factory.cc 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/gpu/gpu_video_decode_accelerator_factory.cc 2016-11-02 10:42:04.634115641 +0100
@@ -14,7 +14,7 @@
#include "media/gpu/dxva_video_decode_accelerator_win.h"
#elif defined(OS_MACOSX)
@@ -456,123 +447,68 @@ diff -aur chromium-53.0.2785.89.orig/media/gpu/gpu_video_decode_accelerator_fact
@@ -79,7 +79,7 @@
#if defined(OS_WIN)
capabilities.supported_profiles =
- DXVAVideoDecodeAccelerator::GetSupportedProfiles();
+ DXVAVideoDecodeAccelerator::GetSupportedProfiles(gpu_preferences);
-#elif defined(OS_CHROMEOS)
+#elif defined(OS_CHROMEOS) || defined(OS_LINUX)
VideoDecodeAccelerator::SupportedProfiles vda_profiles;
#if defined(USE_V4L2_CODEC)
vda_profiles = V4L2VideoDecodeAccelerator::GetSupportedProfiles();
-@@ -127,11 +127,11 @@
- #if defined(OS_WIN)
- &GpuVideoDecodeAcceleratorFactoryImpl::CreateDXVAVDA,
- #endif
--#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
- &GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2VDA,
- &GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2SVDA,
+@@ -131,7 +131,7 @@
+ &GpuVideoDecodeAcceleratorFactory::CreateV4L2VDA,
+ &GpuVideoDecodeAcceleratorFactory::CreateV4L2SVDA,
#endif
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
- &GpuVideoDecodeAcceleratorFactoryImpl::CreateVaapiVDA,
++#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
+ &GpuVideoDecodeAcceleratorFactory::CreateVaapiVDA,
#endif
#if defined(OS_MACOSX)
-@@ -169,7 +169,7 @@
- }
- #endif
-
--#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
- std::unique_ptr<VideoDecodeAccelerator>
- GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2VDA(
- const gpu::GpuDriverBugWorkarounds& workarounds,
@@ -199,11 +199,12 @@
}
#endif
-
+
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
++#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
std::unique_ptr<VideoDecodeAccelerator>
- GpuVideoDecodeAcceleratorFactoryImpl::CreateVaapiVDA(
+ GpuVideoDecodeAcceleratorFactory::CreateVaapiVDA(
const gpu::GpuDriverBugWorkarounds& workarounds,
const gpu::GpuPreferences& gpu_preferences) const {
-+ VLOG(1) << "Creating new VAAPI video decode accelerator.";
++ VLOG(1) << "Creating new VAAPI video decode accelerator.";
std::unique_ptr<VideoDecodeAccelerator> decoder;
decoder.reset(new VaapiVideoDecodeAccelerator(make_context_current_cb_,
bind_image_cb_));
-diff -aur chromium-53.0.2785.89.orig/media/gpu/gpu_video_decode_accelerator_factory_impl.h chromium-53.0.2785.89/media/gpu/gpu_video_decode_accelerator_factory_impl.h
---- chromium-53.0.2785.89.orig/media/gpu/gpu_video_decode_accelerator_factory_impl.h 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/gpu_video_decode_accelerator_factory_impl.h 2016-09-02 01:35:26.224998192 -0700
-@@ -93,7 +93,7 @@
- const gpu::GpuDriverBugWorkarounds& workarounds,
- const gpu::GpuPreferences& gpu_preferences) const;
- #endif
--#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
- std::unique_ptr<VideoDecodeAccelerator> CreateV4L2VDA(
- const gpu::GpuDriverBugWorkarounds& workarounds,
- const gpu::GpuPreferences& gpu_preferences) const;
-@@ -101,8 +101,8 @@
+diff -uar chromium-54.0.2840.90.orig/media/gpu/gpu_video_decode_accelerator_factory.h chromium-54.0.2840.90/media/gpu/gpu_video_decode_accelerator_factory.h
+--- chromium-54.0.2840.90.orig/media/gpu/gpu_video_decode_accelerator_factory.h 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/gpu/gpu_video_decode_accelerator_factory.h 2016-11-02 10:42:04.634115641 +0100
+@@ -98,7 +98,7 @@
const gpu::GpuDriverBugWorkarounds& workarounds,
const gpu::GpuPreferences& gpu_preferences) const;
#endif
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-- std::unique_ptr<VideoDecodeAccelerator> CreateVaapiVDA(
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
-+ std::unique_ptr<VideoDecodeAccelerator> CreateVaapiVDA(
++#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)
+ std::unique_ptr<VideoDecodeAccelerator> CreateVaapiVDA(
const gpu::GpuDriverBugWorkarounds& workarounds,
const gpu::GpuPreferences& gpu_preferences) const;
- #endif
-diff -aur chromium-53.0.2785.89.orig/media/gpu/ipc/service/BUILD.gn chromium-53.0.2785.89/media/gpu/ipc/service/BUILD.gn
---- chromium-53.0.2785.89.orig/media/gpu/ipc/service/BUILD.gn 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/ipc/service/BUILD.gn 2016-09-02 01:35:26.224998192 -0700
-@@ -38,7 +38,7 @@
- "//third_party/mesa:mesa_headers",
- ]
-
+diff -uar chromium-54.0.2840.90.orig/media/gpu/ipc/service/BUILD.gn chromium-54.0.2840.90/media/gpu/ipc/service/BUILD.gn
+--- chromium-54.0.2840.90.orig/media/gpu/ipc/service/BUILD.gn 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/gpu/ipc/service/BUILD.gn 2016-11-02 10:42:04.634115641 +0100
+@@ -45,7 +45,7 @@
+
+ configs += [ "//media/gpu:gpu_config" ]
+
- if (is_chromeos && current_cpu != "arm") {
+ if ((is_desktop_linux || is_chromeos) && current_cpu != "arm") {
configs += [ "//third_party/libva:libva_config" ]
}
-
-diff -aur chromium-53.0.2785.89.orig/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc chromium-53.0.2785.89/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc
---- chromium-53.0.2785.89.orig/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc 2016-09-02 01:35:26.228331534 -0700
-@@ -25,7 +25,7 @@
- #include "media/gpu/ipc/common/media_messages.h"
- #include "ui/gfx/geometry/size.h"
-
--#if defined(OS_CHROMEOS)
-+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
- #if defined(ARCH_CPU_X86_FAMILY)
- #include "media/gpu/vaapi_jpeg_decode_accelerator.h"
- #endif
-@@ -381,7 +381,7 @@
- std::unique_ptr<JpegDecodeAccelerator> GpuJpegDecodeAccelerator::CreateV4L2JDA(
- const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) {
- std::unique_ptr<JpegDecodeAccelerator> decoder;
--#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
- scoped_refptr<V4L2Device> device =
- V4L2Device::Create(V4L2Device::kJpegDecoder);
- if (device)
-@@ -394,7 +394,7 @@
- std::unique_ptr<JpegDecodeAccelerator> GpuJpegDecodeAccelerator::CreateVaapiJDA(
- const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) {
- std::unique_ptr<JpegDecodeAccelerator> decoder;
--#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
- decoder.reset(new VaapiJpegDecodeAccelerator(io_task_runner));
- #endif
- return decoder;
-diff -aur chromium-53.0.2785.89.orig/media/gpu/ipc/service/gpu_video_decode_accelerator.cc chromium-53.0.2785.89/media/gpu/ipc/service/gpu_video_decode_accelerator.cc
---- chromium-53.0.2785.89.orig/media/gpu/ipc/service/gpu_video_decode_accelerator.cc 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/ipc/service/gpu_video_decode_accelerator.cc 2016-09-02 01:35:26.221664850 -0700
+
+diff -uar chromium-54.0.2840.90.orig/media/gpu/ipc/service/gpu_video_decode_accelerator.cc chromium-54.0.2840.90/media/gpu/ipc/service/gpu_video_decode_accelerator.cc
+--- chromium-54.0.2840.90.orig/media/gpu/ipc/service/gpu_video_decode_accelerator.cc 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/gpu/ipc/service/gpu_video_decode_accelerator.cc 2016-11-02 10:42:04.635115792 +0100
@@ -58,7 +58,7 @@
return true;
}
-
+
-#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX)
-+#if ((defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX)
++#if ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX)
static bool BindImage(const base::WeakPtr<gpu::GpuCommandBufferStub>& stub,
uint32_t client_texture_id,
uint32_t texture_target,
@@ -581,113 +517,34 @@ diff -aur chromium-53.0.2785.89.orig/media/gpu/ipc/service/gpu_video_decode_acce
make_context_current_cb_ =
base::Bind(&MakeDecoderContextCurrent, stub_->AsWeakPtr());
-#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX)
-+#if ((defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX)
++#if ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX)
bind_image_cb_ = base::Bind(&BindImage, stub_->AsWeakPtr());
#endif
get_gles2_decoder_cb_ = base::Bind(&GetGLES2Decoder, stub_->AsWeakPtr());
-diff -aur chromium-53.0.2785.89.orig/media/gpu/ipc/service/gpu_video_encode_accelerator.cc chromium-53.0.2785.89/media/gpu/ipc/service/gpu_video_encode_accelerator.cc
---- chromium-53.0.2785.89.orig/media/gpu/ipc/service/gpu_video_encode_accelerator.cc 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/ipc/service/gpu_video_encode_accelerator.cc 2016-09-02 01:35:26.221664850 -0700
-@@ -24,7 +24,7 @@
- #include "media/gpu/gpu_video_accelerator_util.h"
- #include "media/gpu/ipc/common/media_messages.h"
-
--#if defined(OS_CHROMEOS)
-+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
- #if defined(USE_V4L2_CODEC)
- #include "media/gpu/v4l2_video_encode_accelerator.h"
- #endif
-@@ -194,10 +194,10 @@
- GpuVideoEncodeAccelerator::CreateVEAFps(
- const gpu::GpuPreferences& gpu_preferences) {
- std::vector<GpuVideoEncodeAccelerator::CreateVEAFp> create_vea_fps;
--#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
- create_vea_fps.push_back(&GpuVideoEncodeAccelerator::CreateV4L2VEA);
- #endif
--#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
- if (!gpu_preferences.disable_vaapi_accelerated_video_encode)
- create_vea_fps.push_back(&GpuVideoEncodeAccelerator::CreateVaapiVEA);
+diff -uar chromium-54.0.2840.90.orig/media/gpu/va_stub_header.fragment chromium-54.0.2840.90/media/gpu/va_stub_header.fragment
+--- chromium-54.0.2840.90.orig/media/gpu/va_stub_header.fragment 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/gpu/va_stub_header.fragment 2016-11-02 10:42:04.635115792 +0100
+@@ -5,8 +5,9 @@
+
+ #include "third_party/libva/va/drm/va_drm.h"
+ #include "third_party/libva/va/va.h"
+-#if defined(USE_X11)
+ #include "third_party/libva/va/va_x11.h"
++#if defined(USE_OZONE)
++#include "third_party/libva/va/wayland/va_wayland.h"
#endif
-@@ -211,7 +211,7 @@
- return create_vea_fps;
- }
-
--#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
- // static
- std::unique_ptr<VideoEncodeAccelerator>
- GpuVideoEncodeAccelerator::CreateV4L2VEA() {
-@@ -223,7 +223,7 @@
+
}
- #endif
-
--#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
- // static
- std::unique_ptr<VideoEncodeAccelerator>
- GpuVideoEncodeAccelerator::CreateVaapiVEA() {
-diff -aur chromium-53.0.2785.89.orig/media/gpu/ipc/service/gpu_video_encode_accelerator.h chromium-53.0.2785.89/media/gpu/ipc/service/gpu_video_encode_accelerator.h
---- chromium-53.0.2785.89.orig/media/gpu/ipc/service/gpu_video_encode_accelerator.h 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/ipc/service/gpu_video_encode_accelerator.h 2016-09-02 01:35:26.228331534 -0700
-@@ -80,10 +80,10 @@
- // platform.
- static std::vector<CreateVEAFp> CreateVEAFps(
- const gpu::GpuPreferences& gpu_preferences);
--#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
- static std::unique_ptr<VideoEncodeAccelerator> CreateV4L2VEA();
- #endif
--#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
- static std::unique_ptr<VideoEncodeAccelerator> CreateVaapiVEA();
- #endif
- #if defined(OS_ANDROID) && defined(ENABLE_WEBRTC)
-diff -aur chromium-53.0.2785.89.orig/media/gpu/jpeg_decode_accelerator_unittest.cc chromium-53.0.2785.89/media/gpu/jpeg_decode_accelerator_unittest.cc
---- chromium-53.0.2785.89.orig/media/gpu/jpeg_decode_accelerator_unittest.cc 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/jpeg_decode_accelerator_unittest.cc 2016-09-02 01:35:26.221664850 -0700
-@@ -31,7 +31,7 @@
- #include "third_party/libyuv/include/libyuv.h"
- #include "ui/gfx/codec/jpeg_codec.h"
-
--#if defined(OS_CHROMEOS)
-+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
- #if defined(USE_V4L2_CODEC)
- #include "media/gpu/v4l2_device.h"
- #include "media/gpu/v4l2_jpeg_decode_accelerator.h"
-@@ -133,10 +133,10 @@
- JpegClient::~JpegClient() {}
-
- void JpegClient::CreateJpegDecoder() {
--#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
- decoder_.reset(
- new VaapiJpegDecodeAccelerator(base::ThreadTaskRunnerHandle::Get()));
--#elif defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
-+#elif (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
- scoped_refptr<V4L2Device> device =
- V4L2Device::Create(V4L2Device::kJpegDecoder);
- if (!device.get()) {
-@@ -564,7 +564,7 @@
- continue;
- LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second;
- }
--#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
- media::VaapiWrapper::PreSandboxInitialization();
- #endif
-
-diff -aur chromium-53.0.2785.89.orig/media/gpu/vaapi_video_decode_accelerator.cc chromium-53.0.2785.89/media/gpu/vaapi_video_decode_accelerator.cc
---- chromium-53.0.2785.89.orig/media/gpu/vaapi_video_decode_accelerator.cc 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/vaapi_video_decode_accelerator.cc 2016-09-02 01:35:26.224998192 -0700
-@@ -354,17 +354,17 @@
-
+diff -uar chromium-54.0.2840.90.orig/media/gpu/vaapi_video_decode_accelerator.cc chromium-54.0.2840.90/media/gpu/vaapi_video_decode_accelerator.cc
+--- chromium-54.0.2840.90.orig/media/gpu/vaapi_video_decode_accelerator.cc 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/gpu/vaapi_video_decode_accelerator.cc 2016-11-02 10:42:04.635115792 +0100
+@@ -359,17 +359,17 @@
+
base::AutoLock auto_lock(lock_);
DCHECK_EQ(state_, kUninitialized);
- DVLOG(2) << "Initializing VAVDA, profile: " << profile;
+ VLOG(1) << "Initializing VAVDA, profile: " << profile;
-
+
#if defined(USE_X11)
if (gl::GetGLImplementation() != gl::kGLImplementationDesktopGL) {
- DVLOG(1) << "HW video decode acceleration not available without "
@@ -702,16 +559,16 @@ diff -aur chromium-53.0.2785.89.orig/media/gpu/vaapi_video_decode_accelerator.cc
<< "EGLGLES2.";
return false;
}
-@@ -374,7 +374,7 @@
+@@ -379,7 +379,7 @@
VaapiWrapper::kDecode, profile, base::Bind(&ReportToUMA, VAAPI_ERROR));
-
+
if (!vaapi_wrapper_.get()) {
- DVLOG(1) << "Failed initializing VAAPI for profile " << profile;
+ VLOG(1) << "Failed initializing VAAPI for profile " << profile;
return false;
}
-
-@@ -389,7 +389,7 @@
+
+@@ -394,7 +394,7 @@
vp9_accelerator_.reset(new VaapiVP9Accelerator(this, vaapi_wrapper_.get()));
decoder_.reset(new VP9Decoder(vp9_accelerator_.get()));
} else {
@@ -719,10 +576,10 @@ diff -aur chromium-53.0.2785.89.orig/media/gpu/vaapi_video_decode_accelerator.cc
+ VLOG(1) << "Unsupported profile " << profile;
return false;
}
-
-diff -aur chromium-53.0.2785.89.orig/media/gpu/vaapi_wrapper.cc chromium-53.0.2785.89/media/gpu/vaapi_wrapper.cc
---- chromium-53.0.2785.89.orig/media/gpu/vaapi_wrapper.cc 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/vaapi_wrapper.cc 2016-09-02 01:35:26.224998192 -0700
+
+diff -uar chromium-54.0.2840.90.orig/media/gpu/vaapi_wrapper.cc chromium-54.0.2840.90/media/gpu/vaapi_wrapper.cc
+--- chromium-54.0.2840.90.orig/media/gpu/vaapi_wrapper.cc 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/gpu/vaapi_wrapper.cc 2016-11-02 10:42:04.636115943 +0100
@@ -194,7 +194,7 @@
VAProfile va_profile,
const base::Closure& report_error_to_uma_cb) {
@@ -731,7 +588,7 @@ diff -aur chromium-53.0.2785.89.orig/media/gpu/vaapi_wrapper.cc chromium-53.0.27
+ VLOG(1) << "Unsupported va_profile: " << va_profile;
return nullptr;
}
-
+
@@ -347,15 +347,17 @@
bool VaapiWrapper::VaInitialize(const base::Closure& report_error_to_uma_cb) {
static bool vaapi_functions_initialized = PostSandboxInitialization();
@@ -756,7 +613,7 @@ diff -aur chromium-53.0.2785.89.orig/media/gpu/vaapi_wrapper.cc chromium-53.0.27
DVLOG(1) << kErrorMsg;
return false;
@@ -421,7 +423,7 @@
-
+
if (std::find(supported_entrypoints.begin(), supported_entrypoints.end(),
entrypoint) == supported_entrypoints.end()) {
- DVLOG(1) << "Unsupported entrypoint";
@@ -775,125 +632,10 @@ diff -aur chromium-53.0.2785.89.orig/media/gpu/vaapi_wrapper.cc chromium-53.0.27
return false;
}
}
-diff -aur chromium-53.0.2785.89.orig/media/gpu/va_stub_header.fragment chromium-53.0.2785.89/media/gpu/va_stub_header.fragment
---- chromium-53.0.2785.89.orig/media/gpu/va_stub_header.fragment 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/va_stub_header.fragment 2016-09-02 01:35:26.224998192 -0700
-@@ -5,8 +5,9 @@
-
- #include "third_party/libva/va/drm/va_drm.h"
- #include "third_party/libva/va/va.h"
--#if defined(USE_X11)
- #include "third_party/libva/va/va_x11.h"
-+#if defined(USE_OZONE)
-+#include "third_party/libva/va/wayland/va_wayland.h"
- #endif
-
- }
-diff -aur chromium-53.0.2785.89.orig/media/gpu/video_decode_accelerator_unittest.cc chromium-53.0.2785.89/media/gpu/video_decode_accelerator_unittest.cc
---- chromium-53.0.2785.89.orig/media/gpu/video_decode_accelerator_unittest.cc 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/video_decode_accelerator_unittest.cc 2016-09-02 01:35:26.221664850 -0700
-@@ -65,7 +65,7 @@
- #if defined(OS_WIN)
- #include "base/win/windows_version.h"
- #include "media/gpu/dxva_video_decode_accelerator_win.h"
--#elif defined(OS_CHROMEOS)
-+#elif defined(OS_CHROMEOS) || defined(OS_LINUX)
- #if defined(USE_V4L2_CODEC)
- #include "media/gpu/v4l2_device.h"
- #include "media/gpu/v4l2_slice_video_decode_accelerator.h"
-@@ -1778,7 +1778,7 @@
- ui::OzonePlatform::InitializeForUI();
- #endif
-
--#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
- media::VaapiWrapper::PreSandboxInitialization();
- #endif
-
-diff -aur chromium-53.0.2785.89.orig/media/gpu/video_encode_accelerator_unittest.cc chromium-53.0.2785.89/media/gpu/video_encode_accelerator_unittest.cc
---- chromium-53.0.2785.89.orig/media/gpu/video_encode_accelerator_unittest.cc 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/gpu/video_encode_accelerator_unittest.cc 2016-09-02 01:35:26.228331534 -0700
-@@ -49,7 +49,7 @@
- #include "media/video/video_encode_accelerator.h"
- #include "testing/gtest/include/gtest/gtest.h"
-
--#if defined(OS_CHROMEOS)
-+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
- #if defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC))
- #include "media/gpu/v4l2_video_encode_accelerator.h"
- #endif
-@@ -1063,8 +1063,8 @@
-
- std::unique_ptr<VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() {
- std::unique_ptr<VideoEncodeAccelerator> encoder;
--#if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \
-- (defined(USE_OZONE) && defined(USE_V4L2_CODEC)))
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && (defined(ARCH_CPU_ARMEL) || \
-+ (defined(USE_OZONE) && defined(USE_V4L2_CODEC)))
- scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder);
- if (device)
- encoder.reset(new V4L2VideoEncodeAccelerator(device));
-@@ -1074,7 +1074,7 @@
-
- std::unique_ptr<VideoEncodeAccelerator> VEAClient::CreateVaapiVEA() {
- std::unique_ptr<VideoEncodeAccelerator> encoder;
--#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
- encoder.reset(new VaapiVideoEncodeAccelerator());
- #endif
- return encoder;
-@@ -1804,7 +1804,7 @@
- LOG(FATAL) << "--measure_latency requires --run_at_fps enabled to work.";
- }
-
--#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
- media::VaapiWrapper::PreSandboxInitialization();
- #endif
-
-diff -aur chromium-53.0.2785.89.orig/media/media_gpu.gypi chromium-53.0.2785.89/media/media_gpu.gypi
---- chromium-53.0.2785.89.orig/media/media_gpu.gypi 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/media_gpu.gypi 2016-09-02 01:35:26.221664850 -0700
-@@ -125,7 +125,7 @@
- 'gpu/android_video_encode_accelerator.h',
- ],
- }],
-- ['use_v4lplugin==1 and chromeos==1', {
-+ ['use_v4lplugin==1 and (chromeos==1 or desktop_linux==1)', {
- 'direct_dependent_settings': {
- 'defines': [
- 'USE_LIBV4L2'
-@@ -174,7 +174,7 @@
- },
- ],
- }],
-- ['chromeos==1', {
-+ ['chromeos==1 or desktop_linux==1', {
- 'sources': [
- 'gpu/accelerated_video_decoder.h',
- 'gpu/h264_decoder.cc',
-@@ -191,7 +191,7 @@
- 'gpu/vp9_picture.h',
- ],
- }],
-- ['chromeos==1 and use_v4l2_codec==1', {
-+ ['(chromeos==1 or desktop_linux==1) and use_v4l2_codec==1', {
- 'direct_dependent_settings': {
- 'defines': [
- 'USE_V4L2_CODEC'
-@@ -230,7 +230,7 @@
- 'gpu/tegra_v4l2_device.h',
- ],
- }],
-- ['target_arch != "arm" and chromeos == 1', {
-+ ['target_arch != "arm" and (chromeos == 1 or desktop_linux==1)', {
- 'dependencies': [
- '../media/media.gyp:media',
- '../third_party/libyuv/libyuv.gyp:libyuv',
-diff -aur chromium-53.0.2785.89.orig/media/media.gyp chromium-53.0.2785.89/media/media.gyp
---- chromium-53.0.2785.89.orig/media/media.gyp 2016-08-31 15:03:32.000000000 -0700
-+++ chromium-53.0.2785.89/media/media.gyp 2016-09-02 01:35:26.221664850 -0700
-@@ -749,7 +749,7 @@
+diff -uar chromium-54.0.2840.90.orig/media/media.gyp chromium-54.0.2840.90/media/media.gyp
+--- chromium-54.0.2840.90.orig/media/media.gyp 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/media.gyp 2016-11-02 10:42:04.644117154 +0100
+@@ -756,7 +756,7 @@
],
}],
# For VaapiVideoEncodeAccelerator.
@@ -902,7 +644,7 @@ diff -aur chromium-53.0.2785.89.orig/media/media.gyp chromium-53.0.2785.89/media
'sources': [
'filters/h264_bitstream_buffer.cc',
'filters/h264_bitstream_buffer.h',
-@@ -1310,7 +1310,7 @@
+@@ -1319,7 +1319,7 @@
}]
],
}],
@@ -911,39 +653,33 @@ diff -aur chromium-53.0.2785.89.orig/media/media.gyp chromium-53.0.2785.89/media
'sources': [
'filters/h264_bitstream_buffer_unittest.cc',
],
-@@ -2089,7 +2089,7 @@
- },
+@@ -2289,7 +2289,7 @@
],
}],
-- ['chromeos==1', {
-+ ['chromeos==1 or desktop_linux==1', {
- 'targets': [
- {
- 'target_name': 'jpeg_decode_accelerator_unittest',
-@@ -2116,7 +2116,7 @@
- }
- ]
- }],
-- ['chromeos==1 or OS=="mac"', {
-+ ['chromeos==1 or desktop_linux==1 or OS=="mac"', {
- 'targets': [
- {
- 'target_name': 'video_encode_accelerator_unittest',
-@@ -2162,7 +2162,7 @@
- }
- ]
- }],
-- ['chromeos==1 or OS=="win" or OS=="android"', {
-+ ['chromeos==1 or desktop_linux==1 or OS=="win" or OS=="android"', {
- 'targets': [
- {
- # GN: //media/gpu:video_decode_accelerator_unittest
-@@ -2255,7 +2255,7 @@
- ],
- }],
-
+
- ['chromeos==1 and target_arch != "arm"', {
-+ ['(chromeos==1 or desktop_linux==1) and target_arch != "arm"', {
++ ['(desktop_linux==1 or chromeos==1) and target_arch != "arm"', {
'targets': [
{
'target_name': 'vaapi_jpeg_decoder_unittest',
+diff -uar chromium-54.0.2840.90.orig/media/media_gpu.gypi chromium-54.0.2840.90/media/media_gpu.gypi
+--- chromium-54.0.2840.90.orig/media/media_gpu.gypi 2016-11-01 21:59:13.000000000 +0100
++++ chromium-54.0.2840.90/media/media_gpu.gypi 2016-11-02 10:42:04.645117305 +0100
+@@ -175,7 +175,7 @@
+ },
+ ],
+ }],
+- ['chromeos==1', {
++ ['chromeos==1 or desktop_linux==1', {
+ 'sources': [
+ 'gpu/accelerated_video_decoder.h',
+ 'gpu/h264_decoder.cc',
+@@ -231,7 +231,7 @@
+ 'gpu/tegra_v4l2_device.h',
+ ],
+ }],
+- ['target_arch != "arm" and chromeos == 1', {
++ ['target_arch != "arm" and (chromeos == 1 or desktop_linux == 1)', {
+ 'dependencies': [
+ '../media/media.gyp:media',
+ '../third_party/libyuv/libyuv.gyp:libyuv',