summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-05-26 08:16:24 +0000
committer Eric Hameleers <alien@slackware.com>2016-05-26 08:16:24 +0000
commite1c324683ad94e7b638bec2f09ecb34ad77fb8aa (patch)
tree7bea4af338106b10891e3ef2c430a7e7bd59fb98
parente317bc52b3d14d242ed8b11eac65a50ad1ee775b (diff)
downloadasb-e1c324683ad94e7b638bec2f09ecb34ad77fb8aa.tar.gz
asb-e1c324683ad94e7b638bec2f09ecb34ad77fb8aa.tar.xz
chromium: rebased the VAAPI patch against chromium 51.0.2704.63.
-rw-r--r--chromium/build/patches/chromium_vaapi.patch333
1 files changed, 210 insertions, 123 deletions
diff --git a/chromium/build/patches/chromium_vaapi.patch b/chromium/build/patches/chromium_vaapi.patch
index d16e7c55..f44316e1 100644
--- a/chromium/build/patches/chromium_vaapi.patch
+++ b/chromium/build/patches/chromium_vaapi.patch
@@ -3,14 +3,14 @@ Enables using VA-API hardware acceleration in Linux. The patch for bpf_gpu_polic
Taken from:
https://code.launchpad.net/~saiarcot895/chromium-browser/chromium-browser.wily.dev
-And rebased against chromium-dev 50.0.2661.75 sources.
+And rebased against chromium-dev 51.0.2704.63 sources.
--------
-diff -uarN chromium-50.0.2661.75.orig/chrome/browser/about_flags.cc chromium-50.0.2661.75/chrome/browser/about_flags.cc
---- chromium-50.0.2661.75.orig/chrome/browser/about_flags.cc 2016-04-13 22:59:38.000000000 +0200
-+++ chromium-50.0.2661.75/chrome/browser/about_flags.cc 2016-04-16 00:44:45.685691647 +0200
-@@ -854,7 +854,7 @@
+diff -uar chromium-51.0.2704.63.orig/chrome/browser/about_flags.cc chromium-51.0.2704.63/chrome/browser/about_flags.cc
+--- chromium-51.0.2704.63.orig/chrome/browser/about_flags.cc 2016-05-25 21:00:57.000000000 +0200
++++ chromium-51.0.2704.63/chrome/browser/about_flags.cc 2016-05-26 09:45:41.205615406 +0200
+@@ -843,7 +843,7 @@
"disable-accelerated-video-decode",
IDS_FLAGS_ACCELERATED_VIDEO_DECODE_NAME,
IDS_FLAGS_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
@@ -19,24 +19,68 @@ diff -uarN chromium-50.0.2661.75.orig/chrome/browser/about_flags.cc chromium-50.
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
#if defined(USE_ASH)
-diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/client/command_buffer_proxy_impl.cc chromium-50.0.2661.75/content/common/gpu/client/command_buffer_proxy_impl.cc
---- chromium-50.0.2661.75.orig/content/common/gpu/client/command_buffer_proxy_impl.cc 2016-04-13 22:59:46.000000000 +0200
-+++ chromium-50.0.2661.75/content/common/gpu/client/command_buffer_proxy_impl.cc 2016-04-16 00:41:59.606303547 +0200
-@@ -641,8 +641,10 @@
+diff -uar chromium-51.0.2704.63.orig/content/common/BUILD.gn chromium-51.0.2704.63/content/common/BUILD.gn
+--- chromium-51.0.2704.63.orig/content/common/BUILD.gn 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/common/BUILD.gn 2016-05-26 09:45:41.207615638 +0200
+@@ -11,7 +11,7 @@
+ import("//build/config/mac/mac_sdk.gni")
+ }
- scoped_ptr<media::VideoDecodeAccelerator>
- CommandBufferProxyImpl::CreateVideoDecoder() {
-+ TRACE_EVENT0("gpu", "CommandBufferProxyImpl::CreateVideoDecoder");
- if (!channel_)
- return scoped_ptr<media::VideoDecodeAccelerator>();
-+ VLOG(1) << "About to create GpuVideoDecodeAcceleratorHost.";
- return scoped_ptr<media::VideoDecodeAccelerator>(
- new GpuVideoDecodeAcceleratorHost(channel_, this));
+-if (is_chromeos && current_cpu != "arm") {
++if (is_linux && !(is_chromeos && current_cpu == "arm")) {
+ action("libva_generate_stubs") {
+ extra_header = "gpu/media/va_stub_header.fragment"
+
+@@ -347,7 +347,7 @@
+ }
+ }
+
+- if (is_chromeos) {
++ if (is_linux) {
+ sources += [
+ "gpu/media/accelerated_video_decoder.h",
+ "gpu/media/h264_decoder.cc",
+@@ -392,13 +392,13 @@
+ "GLESv2",
+ ]
+ }
+- if (current_cpu == "arm") {
++ if (current_cpu == "arm" && is_chromeos) {
+ sources += [
+ "gpu/media/tegra_v4l2_device.cc",
+ "gpu/media/tegra_v4l2_device.h",
+ ]
+ }
+- if (current_cpu != "arm") {
++ if (current_cpu != "arm" || !is_chromeos) {
+ sources += [
+ "gpu/media/va_surface.h",
+ "gpu/media/vaapi_jpeg_decode_accelerator.cc",
+diff -uar chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator.cc chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator.cc
+--- chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator.cc 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator.cc 2016-05-26 09:45:41.208615755 +0200
+@@ -57,7 +57,7 @@
+ return true;
}
-diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/gpu_video_decode_accelerator.cc chromium-50.0.2661.75/content/common/gpu/media/gpu_video_decode_accelerator.cc
---- chromium-50.0.2661.75.orig/content/common/gpu/media/gpu_video_decode_accelerator.cc 2016-04-13 22:59:46.000000000 +0200
-+++ chromium-50.0.2661.75/content/common/gpu/media/gpu_video_decode_accelerator.cc 2016-04-16 00:41:59.617304831 +0200
-@@ -34,7 +34,7 @@
+
+-#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX)
++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX) || defined(OS_LINUX)
+ static bool BindImage(const base::WeakPtr<gpu::GpuCommandBufferStub>& stub,
+ uint32_t client_texture_id,
+ uint32_t texture_target,
+@@ -169,7 +169,7 @@
+ get_gl_context_cb_ = base::Bind(&GetGLContext, stub_->AsWeakPtr());
+ 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(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX) || defined(OS_LINUX)
+ bind_image_cb_ = base::Bind(&BindImage, stub_->AsWeakPtr());
+ #endif
+ get_gles2_decoder_cb_ = base::Bind(&GetGLES2Decoder, stub_->AsWeakPtr());
+diff -uar chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc
+--- chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc 2016-05-26 09:45:41.208615755 +0200
+@@ -13,14 +13,14 @@
#include "content/common/gpu/media/dxva_video_decode_accelerator_win.h"
#elif defined(OS_MACOSX)
#include "content/common/gpu/media/vt_video_decode_accelerator_mac.h"
@@ -45,7 +89,15 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/gpu_video_decode_
#if defined(USE_V4L2_CODEC)
#include "content/common/gpu/media/v4l2_device.h"
#include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h"
-@@ -164,7 +164,7 @@
+ #include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
+ #include "ui/gl/gl_surface_egl.h"
+ #endif
+-#if defined(ARCH_CPU_X86_FAMILY)
++#if defined(ARCH_CPU_X86_FAMILY) || defined(OS_LINUX)
+ #include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
+ #include "ui/gl/gl_implementation.h"
+ #endif
+@@ -78,7 +78,7 @@
#if defined(OS_WIN)
capabilities.supported_profiles =
DXVAVideoDecodeAccelerator::GetSupportedProfiles();
@@ -54,45 +106,53 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/gpu_video_decode_
media::VideoDecodeAccelerator::SupportedProfiles vda_profiles;
#if defined(USE_V4L2_CODEC)
vda_profiles = V4L2VideoDecodeAccelerator::GetSupportedProfiles();
-@@ -346,6 +346,8 @@
- }
+@@ -88,7 +88,7 @@
+ media::GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles(
+ vda_profiles, &capabilities.supported_profiles);
+ #endif
+-#if defined(ARCH_CPU_X86_FAMILY)
++#if defined(ARCH_CPU_X86_FAMILY) || defined(OS_LINUX)
+ vda_profiles = VaapiVideoDecodeAccelerator::GetSupportedProfiles();
+ media::GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles(
+ vda_profiles, &capabilities.supported_profiles);
+@@ -129,7 +129,7 @@
+ &GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2VDA,
+ &GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2SVDA,
+ #endif
+-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_LINUX)
+ &GpuVideoDecodeAcceleratorFactoryImpl::CreateVaapiVDA,
+ #endif
+ #if defined(OS_MACOSX)
+@@ -194,10 +194,11 @@
+ }
#endif
-+ VLOG(1) << "Initializing GPU video decode accelerator.";
-+
- // Array of Create..VDA() function pointers, maybe applicable to the current
- // platform. This list is ordered by priority of use and it should be the
- // same as the order of querying supported profiles of VDAs.
-@@ -359,11 +361,14 @@
- &GpuVideoDecodeAccelerator::CreateAndroidVDA};
-
- for (const auto& create_vda_function : create_vda_fps) {
-+ VLOG(1) << "Testing create_vda_function.";
- video_decode_accelerator_ = (this->*create_vda_function)();
- if (!video_decode_accelerator_ ||
- !video_decode_accelerator_->Initialize(config, this))
- continue;
-
-+ VLOG(1) << "Initialization successful.";
-+
- if (video_decode_accelerator_->CanDecodeOnIOThread()) {
- filter_ = new MessageFilter(this, host_route_id_);
- stub_->channel()->AddFilter(filter_.get());
-@@ -444,7 +449,9 @@
+-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_LINUX)
scoped_ptr<media::VideoDecodeAccelerator>
- GpuVideoDecodeAccelerator::CreateVaapiVDA() {
+ GpuVideoDecodeAcceleratorFactoryImpl::CreateVaapiVDA(
+ const gpu::GpuPreferences& gpu_preferences) const {
++ VLOG(1) << "Creating new VAAPI video decode accelerator.";
scoped_ptr<media::VideoDecodeAccelerator> decoder;
+ decoder.reset(new VaapiVideoDecodeAccelerator(make_context_current_cb_,
+ bind_image_cb_));
+diff -uar chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h
+--- chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h 2016-05-26 09:45:41.208615755 +0200
+@@ -95,7 +95,7 @@
+ scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2SVDA(
+ const gpu::GpuPreferences& gpu_preferences) const;
+ #endif
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+ VLOG(1) << "About to create new VAAPI video decode accelerator.";
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
-+ VLOG(1) << "Creating new VAAPI video decode accelerator.";
- decoder.reset(new VaapiVideoDecodeAccelerator(
- make_context_current_, base::Bind(&GpuVideoDecodeAccelerator::BindImage,
- base::Unretained(this))));
-diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_video_decode_accelerator.cc chromium-50.0.2661.75/content/common/gpu/media/vaapi_video_decode_accelerator.cc
---- chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_video_decode_accelerator.cc 2016-04-13 22:59:46.000000000 +0200
-+++ chromium-50.0.2661.75/content/common/gpu/media/vaapi_video_decode_accelerator.cc 2016-04-16 00:41:59.618304948 +0200
-@@ -334,17 +334,17 @@
++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_LINUX)
+ scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA(
+ const gpu::GpuPreferences& gpu_preferences) const;
+ #endif
+diff -uar chromium-51.0.2704.63.orig/content/common/gpu/media/vaapi_video_decode_accelerator.cc chromium-51.0.2704.63/content/common/gpu/media/vaapi_video_decode_accelerator.cc
+--- chromium-51.0.2704.63.orig/content/common/gpu/media/vaapi_video_decode_accelerator.cc 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/common/gpu/media/vaapi_video_decode_accelerator.cc 2016-05-26 09:45:41.209615872 +0200
+@@ -337,17 +337,17 @@
base::AutoLock auto_lock(lock_);
DCHECK_EQ(state_, kUninitialized);
@@ -113,7 +173,7 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_video_decod
<< "EGLGLES2.";
return false;
}
-@@ -354,7 +354,7 @@
+@@ -357,7 +357,7 @@
VaapiWrapper::kDecode, profile, base::Bind(&ReportToUMA, VAAPI_ERROR));
if (!vaapi_wrapper_.get()) {
@@ -122,7 +182,7 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_video_decod
return false;
}
-@@ -371,7 +371,7 @@
+@@ -374,7 +374,7 @@
vp9_accelerator_.reset(new VaapiVP9Accelerator(this, vaapi_wrapper_.get()));
decoder_.reset(new VP9Decoder(vp9_accelerator_.get()));
} else {
@@ -131,9 +191,9 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_video_decod
return false;
}
-diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_wrapper.cc chromium-50.0.2661.75/content/common/gpu/media/vaapi_wrapper.cc
---- chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_wrapper.cc 2016-04-13 22:59:46.000000000 +0200
-+++ chromium-50.0.2661.75/content/common/gpu/media/vaapi_wrapper.cc 2016-04-16 00:41:59.619305064 +0200
+diff -uar chromium-51.0.2704.63.orig/content/common/gpu/media/vaapi_wrapper.cc chromium-51.0.2704.63/content/common/gpu/media/vaapi_wrapper.cc
+--- chromium-51.0.2704.63.orig/content/common/gpu/media/vaapi_wrapper.cc 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/common/gpu/media/vaapi_wrapper.cc 2016-05-26 09:45:41.209615872 +0200
@@ -186,7 +186,7 @@
VAProfile va_profile,
const base::Closure& report_error_to_uma_cb) {
@@ -143,7 +203,7 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_wrapper.cc
return nullptr;
}
-@@ -345,15 +345,17 @@
+@@ -341,15 +341,17 @@
bool VaapiWrapper::VaInitialize(const base::Closure& report_error_to_uma_cb) {
static bool vaapi_functions_initialized = PostSandboxInitialization();
if (!vaapi_functions_initialized) {
@@ -166,7 +226,7 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_wrapper.cc
else
DVLOG(1) << kErrorMsg;
return false;
-@@ -421,7 +423,7 @@
+@@ -417,7 +419,7 @@
if (std::find(supported_entrypoints.begin(),
supported_entrypoints.end(),
entrypoint) == supported_entrypoints.end()) {
@@ -175,7 +235,7 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_wrapper.cc
return false;
}
return true;
-@@ -445,8 +447,8 @@
+@@ -441,8 +443,8 @@
if (attribs[i].type != required_attribs[i].type ||
(attribs[i].value & required_attribs[i].value) !=
required_attribs[i].value) {
@@ -186,9 +246,9 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/gpu/media/vaapi_wrapper.cc
return false;
}
}
-diff -uarN chromium-50.0.2661.75.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc chromium-50.0.2661.75/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
---- chromium-50.0.2661.75.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-03-25 14:04:48.000000000 +0100
-+++ chromium-50.0.2661.75/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-04-16 00:41:59.632306581 +0200
+diff -uar chromium-51.0.2704.63.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc chromium-51.0.2704.63/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+--- chromium-51.0.2704.63.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-05-26 09:45:41.210615989 +0200
@@ -22,6 +22,8 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
@@ -228,7 +288,13 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/sandbox_linux/bpf_gpu_polic
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
accelerated_encode_enabled =
-@@ -300,27 +309,41 @@
+@@ -295,32 +304,46 @@
+ GpuBrokerProcessPolicy::Create,
+ std::vector<BrokerFilePermission>()); // No extra files in whitelist.
+
+- if (IsArchitectureX86_64() || IsArchitectureI386()) {
++ if (true) {
+ // Accelerated video dlopen()'s some shared objects
// inside the sandbox, so preload them now.
if (IsAcceleratedVaapiVideoEncodeEnabled() ||
IsAcceleratedVideoDecodeEnabled()) {
@@ -284,14 +350,14 @@ diff -uarN chromium-50.0.2661.75.orig/content/common/sandbox_linux/bpf_gpu_polic
+ return false;
+ }
+ } // end of IsAcceleratedVaapiVideoEncodeEnabled() || IsAcceleratedVideoDecodeEnabled()
-+ } // end of IsArchitectureX86_64() || IsArchitectureI386()
++ } // end of true
return true;
}
-diff -uarN chromium-50.0.2661.75.orig/content/content_common.gypi chromium-50.0.2661.75/content/content_common.gypi
---- chromium-50.0.2661.75.orig/content/content_common.gypi 2016-04-13 22:59:46.000000000 +0200
-+++ chromium-50.0.2661.75/content/content_common.gypi 2016-04-16 00:41:59.642307748 +0200
-@@ -860,7 +860,7 @@
+diff -uar chromium-51.0.2704.63.orig/content/content_common.gypi chromium-51.0.2704.63/content/content_common.gypi
+--- chromium-51.0.2704.63.orig/content/content_common.gypi 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/content_common.gypi 2016-05-26 09:45:41.210615989 +0200
+@@ -790,7 +790,7 @@
},
],
}],
@@ -300,64 +366,76 @@ diff -uarN chromium-50.0.2661.75.orig/content/content_common.gypi chromium-50.0.
'sources': [
'common/gpu/media/accelerated_video_decoder.h',
'common/gpu/media/h264_decoder.cc',
-@@ -916,7 +916,7 @@
+@@ -846,7 +846,7 @@
'common/gpu/media/tegra_v4l2_device.h',
],
}],
- ['target_arch != "arm" and chromeos == 1', {
-+ ['target_arch != "arm" and (chromeos == 1 or desktop_linux == 1)', {
++ ['(target_arch != "arm" and chromeos == 1) or desktop_linux == 1', {
'dependencies': [
'../media/media.gyp:media',
'../third_party/libyuv/libyuv.gyp:libyuv',
-diff -uarN chromium-50.0.2661.75.orig/content/content_gpu.gypi chromium-50.0.2661.75/content/content_gpu.gypi
---- chromium-50.0.2661.75.orig/content/content_gpu.gypi 2016-04-13 22:59:46.000000000 +0200
-+++ chromium-50.0.2661.75/content/content_gpu.gypi 2016-04-16 00:41:59.643307865 +0200
-@@ -40,7 +40,7 @@
+diff -uar chromium-51.0.2704.63.orig/content/content_gpu.gypi chromium-51.0.2704.63/content/content_gpu.gypi
+--- chromium-51.0.2704.63.orig/content/content_gpu.gypi 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/content_gpu.gypi 2016-05-26 09:45:41.210615989 +0200
+@@ -45,7 +45,7 @@
],
},
}],
- ['target_arch!="arm" and chromeos == 1', {
-+ ['target_arch!="arm" and (chromeos == 1 or desktop_linux == 1)', {
++ ['(target_arch!="arm" and chromeos == 1) or desktop_linux == 1', {
'include_dirs': [
'<(DEPTH)/third_party/libva',
],
-diff -uarN chromium-50.0.2661.75.orig/content/content_tests.gypi chromium-50.0.2661.75/content/content_tests.gypi
---- chromium-50.0.2661.75.orig/content/content_tests.gypi 2016-04-13 22:59:46.000000000 +0200
-+++ chromium-50.0.2661.75/content/content_tests.gypi 2016-04-16 00:41:59.648308450 +0200
-@@ -1784,7 +1784,7 @@
+diff -uar chromium-51.0.2704.63.orig/content/content_tests.gypi chromium-51.0.2704.63/content/content_tests.gypi
+--- chromium-51.0.2704.63.orig/content/content_tests.gypi 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/content_tests.gypi 2016-05-26 09:45:41.211616106 +0200
+@@ -1729,7 +1729,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 -uarN chromium-50.0.2661.75.orig/content/gpu/gpu_main.cc chromium-50.0.2661.75/content/gpu/gpu_main.cc
---- chromium-50.0.2661.75.orig/content/gpu/gpu_main.cc 2016-04-13 22:59:46.000000000 +0200
-+++ chromium-50.0.2661.75/content/gpu/gpu_main.cc 2016-04-16 00:41:59.655309266 +0200
-@@ -76,7 +76,7 @@
+diff -uar chromium-51.0.2704.63.orig/content/gpu/BUILD.gn chromium-51.0.2704.63/content/gpu/BUILD.gn
+--- chromium-51.0.2704.63.orig/content/gpu/BUILD.gn 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/gpu/BUILD.gn 2016-05-26 09:45:41.229618219 +0200
+@@ -81,7 +81,7 @@
+ ]
+ }
+
+- if (is_chromeos && current_cpu != "arm") {
++ if ((is_chromeos && current_cpu != "arm") || is_linux) {
+ configs += [ "//third_party/libva:libva_config" ]
+ }
+
+diff -uar chromium-51.0.2704.63.orig/content/gpu/gpu_main.cc chromium-51.0.2704.63/content/gpu/gpu_main.cc
+--- chromium-51.0.2704.63.orig/content/gpu/gpu_main.cc 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/gpu/gpu_main.cc 2016-05-26 09:45:41.240619514 +0200
+@@ -74,7 +74,7 @@
#include "content/common/sandbox_mac.h"
#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_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_LINUX)
#include "content/common/gpu/media/vaapi_wrapper.h"
#endif
-@@ -247,7 +247,7 @@
+@@ -245,7 +245,7 @@
GetGpuInfoFromCommandLine(gpu_info, command_line);
gpu_info.in_process_gpu = false;
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
-+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_LINUX)
VaapiWrapper::PreSandboxInitialization();
#endif
-diff -uarN chromium-50.0.2661.75.orig/content/public/common/content_switches.cc chromium-50.0.2661.75/content/public/common/content_switches.cc
---- chromium-50.0.2661.75.orig/content/public/common/content_switches.cc 2016-04-13 22:59:46.000000000 +0200
-+++ chromium-50.0.2661.75/content/public/common/content_switches.cc 2016-04-16 00:41:59.672311252 +0200
-@@ -972,7 +972,9 @@
+diff -uar chromium-51.0.2704.63.orig/content/public/common/content_switches.cc chromium-51.0.2704.63/content/public/common/content_switches.cc
+--- chromium-51.0.2704.63.orig/content/public/common/content_switches.cc 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/public/common/content_switches.cc 2016-05-26 09:45:41.240619514 +0200
+@@ -957,7 +957,9 @@
#if defined(OS_CHROMEOS)
// Disables panel fitting (used for mirror mode).
const char kDisablePanelFitting[] = "disable-panel-fitting";
@@ -367,10 +445,10 @@ diff -uarN chromium-50.0.2661.75.orig/content/public/common/content_switches.cc
// Disables VA-API accelerated video encode.
const char kDisableVaapiAcceleratedVideoEncode[] =
"disable-vaapi-accelerated-video-encode";
-diff -uarN chromium-50.0.2661.75.orig/content/public/common/content_switches.h chromium-50.0.2661.75/content/public/common/content_switches.h
---- chromium-50.0.2661.75.orig/content/public/common/content_switches.h 2016-04-13 22:59:46.000000000 +0200
-+++ chromium-50.0.2661.75/content/public/common/content_switches.h 2016-04-16 00:41:59.683312536 +0200
-@@ -281,6 +281,8 @@
+diff -uar chromium-51.0.2704.63.orig/content/public/common/content_switches.h chromium-51.0.2704.63/content/public/common/content_switches.h
+--- chromium-51.0.2704.63.orig/content/public/common/content_switches.h 2016-05-25 21:01:01.000000000 +0200
++++ chromium-51.0.2704.63/content/public/common/content_switches.h 2016-05-26 09:45:41.241619632 +0200
+@@ -274,6 +274,8 @@
#if defined(OS_CHROMEOS)
CONTENT_EXPORT extern const char kDisablePanelFitting[];
@@ -379,10 +457,10 @@ diff -uarN chromium-50.0.2661.75.orig/content/public/common/content_switches.h c
CONTENT_EXPORT extern const char kDisableVaapiAcceleratedVideoEncode[];
#endif
-diff -uarN chromium-50.0.2661.75.orig/gpu/config/software_rendering_list_json.cc chromium-50.0.2661.75/gpu/config/software_rendering_list_json.cc
---- chromium-50.0.2661.75.orig/gpu/config/software_rendering_list_json.cc 2016-04-13 22:59:47.000000000 +0200
-+++ chromium-50.0.2661.75/gpu/config/software_rendering_list_json.cc 2016-04-16 00:41:59.692313586 +0200
-@@ -481,17 +481,6 @@
+diff -uar chromium-51.0.2704.63.orig/gpu/config/software_rendering_list_json.cc chromium-51.0.2704.63/gpu/config/software_rendering_list_json.cc
+--- chromium-51.0.2704.63.orig/gpu/config/software_rendering_list_json.cc 2016-05-25 21:01:02.000000000 +0200
++++ chromium-51.0.2704.63/gpu/config/software_rendering_list_json.cc 2016-05-26 09:45:41.256621394 +0200
+@@ -484,17 +484,6 @@
]
},
{
@@ -400,36 +478,45 @@ diff -uarN chromium-50.0.2661.75.orig/gpu/config/software_rendering_list_json.cc
"id": 49,
"description": "NVidia GeForce GT 650M can cause the system to hang with flash 3D",
"cr_bugs": [140175],
-@@ -1048,6 +1037,11 @@
- "type": "android"
- },
- "gl_renderer": ".*Google.*"
-+ },
-+ {
-+ "os": {
-+ "type": "linux"
-+ }
- }
- ],
- "features": [
-diff -uarN chromium-50.0.2661.75.orig/media/media.gyp chromium-50.0.2661.75/media/media.gyp
---- chromium-50.0.2661.75.orig/media/media.gyp 2016-04-13 22:59:48.000000000 +0200
-+++ chromium-50.0.2661.75/media/media.gyp 2016-04-16 00:41:59.709315572 +0200
-@@ -724,7 +724,7 @@
+diff -uar chromium-51.0.2704.63.orig/media/BUILD.gn chromium-51.0.2704.63/media/BUILD.gn
+--- chromium-51.0.2704.63.orig/media/BUILD.gn 2016-05-25 21:01:03.000000000 +0200
++++ chromium-51.0.2704.63/media/BUILD.gn 2016-05-26 09:45:41.256621394 +0200
+@@ -326,7 +326,7 @@
+ allow_circular_includes_from = [ "//media/base/android" ]
+ }
+
+- if (current_cpu != "arm" && is_chromeos) {
++ if ((current_cpu != "arm" && is_chromeos) || is_linux) {
+ sources += [
+ "filters/h264_bitstream_buffer.cc",
+ "filters/h264_bitstream_buffer.h",
+@@ -615,7 +615,7 @@
+ }
+ }
+
+- if (current_cpu != "arm" && is_chromeos) {
++ if ((current_cpu != "arm" && is_chromeos) || is_linux) {
+ sources += [ "filters/h264_bitstream_buffer_unittest.cc" ]
+ }
+
+diff -uar chromium-51.0.2704.63.orig/media/media.gyp chromium-51.0.2704.63/media/media.gyp
+--- chromium-51.0.2704.63.orig/media/media.gyp 2016-05-25 21:01:03.000000000 +0200
++++ chromium-51.0.2704.63/media/media.gyp 2016-05-26 09:45:41.274623511 +0200
+@@ -739,7 +739,7 @@
],
}],
# For VaapiVideoEncodeAccelerator.
- ['target_arch != "arm" and chromeos == 1', {
-+ ['target_arch != "arm" and (chromeos == 1 or desktop_linux == 1)', {
++ ['(target_arch != "arm" and chromeos == 1) or desktop_linux == 1', {
'sources': [
'filters/h264_bitstream_buffer.cc',
'filters/h264_bitstream_buffer.h',
-@@ -1354,7 +1354,7 @@
+@@ -1313,7 +1313,7 @@
'cdm/cdm_adapter_unittest.cc',
],
}],
- ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
-+ ['target_arch != "arm" and (chromeos == 1 or desktop_linux == 1) and use_x11 == 1', {
++ ['(target_arch != "arm" and chromeos == 1) or desktop_linux == 1 and use_x11 == 1', {
'sources': [
'filters/h264_bitstream_buffer_unittest.cc',
],