mirror of
https://abf.rosa.ru/djam/chromium-browser-stable-test.git
synced 2025-02-24 18:12:47 +00:00
update vaapi patch from http://www.slackware.com/~alien/slackbuilds/chromium/build/patches/chromium_vaapi.patch
This commit is contained in:
parent
2a99e558de
commit
8e64523095
1 changed files with 333 additions and 283 deletions
|
@ -1,38 +1,41 @@
|
||||||
diff --git a/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc b/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
|
Description:
|
||||||
index de0f587..2d899ad 100644
|
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
|
||||||
--- a/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
|
|
||||||
+++ b/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
|
Taken from:
|
||||||
@@ -20,7 +20,7 @@
|
https://code.launchpad.net/~saiarcot895/chromium-browser/chromium-browser.wily.dev
|
||||||
#include "media/filters/jpeg_parser.h"
|
And rebased against chromium-dev 48.0.2564.82 sources.
|
||||||
#include "ui/gfx/geometry/size.h"
|
|
||||||
|
|
||||||
-#if defined(OS_CHROMEOS)
|
--------
|
||||||
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
|
||||||
#if defined(ARCH_CPU_X86_FAMILY)
|
diff -uar chromium-48.0.2564.82.orig/chrome/browser/about_flags.cc chromium-48.0.2564.82/chrome/browser/about_flags.cc
|
||||||
#include "content/common/gpu/media/vaapi_jpeg_decode_accelerator.h"
|
--- chromium-48.0.2564.82.orig/chrome/browser/about_flags.cc 2016-01-20 21:01:19.000000000 +0100
|
||||||
#endif
|
+++ chromium-48.0.2564.82/chrome/browser/about_flags.cc 2016-01-24 12:37:54.343633831 +0100
|
||||||
@@ -402,7 +402,7 @@ scoped_ptr<media::JpegDecodeAccelerator>
|
@@ -1017,7 +1017,7 @@
|
||||||
GpuJpegDecodeAccelerator::CreateV4L2JDA(
|
"disable-accelerated-video-decode",
|
||||||
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) {
|
IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
|
||||||
scoped_ptr<media::JpegDecodeAccelerator> decoder;
|
IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
|
||||||
-#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
|
- kOsMac | kOsWin | kOsCrOS,
|
||||||
+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
|
+ kOsAll,
|
||||||
scoped_refptr<V4L2Device> device = V4L2Device::Create(
|
SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
|
||||||
V4L2Device::kJpegDecoder);
|
},
|
||||||
if (device)
|
#if defined(USE_ASH)
|
||||||
@@ -416,7 +416,7 @@ scoped_ptr<media::JpegDecodeAccelerator>
|
diff -uar chromium-48.0.2564.82.orig/content/common/gpu/client/command_buffer_proxy_impl.cc chromium-48.0.2564.82/content/common/gpu/client/command_buffer_proxy_impl.cc
|
||||||
GpuJpegDecodeAccelerator::CreateVaapiJDA(
|
--- chromium-48.0.2564.82.orig/content/common/gpu/client/command_buffer_proxy_impl.cc 2016-01-20 21:01:21.000000000 +0100
|
||||||
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) {
|
+++ chromium-48.0.2564.82/content/common/gpu/client/command_buffer_proxy_impl.cc 2016-01-24 12:37:54.344633997 +0100
|
||||||
scoped_ptr<media::JpegDecodeAccelerator> decoder;
|
@@ -667,8 +667,10 @@
|
||||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
|
||||||
+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
|
scoped_ptr<media::VideoDecodeAccelerator>
|
||||||
decoder.reset(new VaapiJpegDecodeAccelerator(io_task_runner));
|
CommandBufferProxyImpl::CreateVideoDecoder() {
|
||||||
#endif
|
+ TRACE_EVENT0("gpu", "CommandBufferProxyImpl::CreateVideoDecoder");
|
||||||
return decoder.Pass();
|
if (!channel_)
|
||||||
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
|
return scoped_ptr<media::VideoDecodeAccelerator>();
|
||||||
index ed4d179..446d3b9 100644
|
+ VLOG(1) << "About to create GpuVideoDecodeAcceleratorHost.";
|
||||||
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
|
return scoped_ptr<media::VideoDecodeAccelerator>(
|
||||||
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
|
new GpuVideoDecodeAcceleratorHost(channel_, this));
|
||||||
|
}
|
||||||
|
diff -uar chromium-48.0.2564.82.orig/content/common/gpu/media/gpu_video_decode_accelerator.cc chromium-48.0.2564.82/content/common/gpu/media/gpu_video_decode_accelerator.cc
|
||||||
|
--- chromium-48.0.2564.82.orig/content/common/gpu/media/gpu_video_decode_accelerator.cc 2016-01-20 21:01:21.000000000 +0100
|
||||||
|
+++ chromium-48.0.2564.82/content/common/gpu/media/gpu_video_decode_accelerator.cc 2016-01-24 12:40:38.968995605 +0100
|
||||||
@@ -33,7 +33,7 @@
|
@@ -33,7 +33,7 @@
|
||||||
#include "content/common/gpu/media/dxva_video_decode_accelerator.h"
|
#include "content/common/gpu/media/dxva_video_decode_accelerator.h"
|
||||||
#elif defined(OS_MACOSX)
|
#elif defined(OS_MACOSX)
|
||||||
|
@ -42,7 +45,7 @@ index ed4d179..446d3b9 100644
|
||||||
#if defined(USE_V4L2_CODEC)
|
#if defined(USE_V4L2_CODEC)
|
||||||
#include "content/common/gpu/media/v4l2_device.h"
|
#include "content/common/gpu/media/v4l2_device.h"
|
||||||
#include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h"
|
#include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h"
|
||||||
@@ -164,7 +164,7 @@ GpuVideoDecodeAccelerator::GetSupportedProfiles() {
|
@@ -164,7 +164,7 @@
|
||||||
// can be initialized by corresponding VDA successfully.
|
// can be initialized by corresponding VDA successfully.
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
profiles = DXVAVideoDecodeAccelerator::GetSupportedProfiles();
|
profiles = DXVAVideoDecodeAccelerator::GetSupportedProfiles();
|
||||||
|
@ -51,227 +54,253 @@ index ed4d179..446d3b9 100644
|
||||||
media::VideoDecodeAccelerator::SupportedProfiles vda_profiles;
|
media::VideoDecodeAccelerator::SupportedProfiles vda_profiles;
|
||||||
#if defined(USE_V4L2_CODEC)
|
#if defined(USE_V4L2_CODEC)
|
||||||
vda_profiles = V4L2VideoDecodeAccelerator::GetSupportedProfiles();
|
vda_profiles = V4L2VideoDecodeAccelerator::GetSupportedProfiles();
|
||||||
@@ -389,7 +389,7 @@ GpuVideoDecodeAccelerator::CreateDXVAVDA() {
|
@@ -341,6 +341,8 @@
|
||||||
scoped_ptr<media::VideoDecodeAccelerator>
|
}
|
||||||
GpuVideoDecodeAccelerator::CreateV4L2VDA() {
|
#endif
|
||||||
scoped_ptr<media::VideoDecodeAccelerator> decoder;
|
|
||||||
-#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
|
+ VLOG(1) << "Initializing GPU video decode accelerator.";
|
||||||
+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
|
+
|
||||||
scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
|
// Array of Create..VDA() function pointers, maybe applicable to the current
|
||||||
if (device.get()) {
|
// platform. This list is ordered by priority of use and it should be the
|
||||||
decoder.reset(new V4L2VideoDecodeAccelerator(
|
// same as the order of querying supported profiles of VDAs.
|
||||||
@@ -407,7 +407,7 @@ GpuVideoDecodeAccelerator::CreateV4L2VDA() {
|
@@ -354,11 +356,14 @@
|
||||||
scoped_ptr<media::VideoDecodeAccelerator>
|
&GpuVideoDecodeAccelerator::CreateAndroidVDA};
|
||||||
GpuVideoDecodeAccelerator::CreateV4L2SliceVDA() {
|
|
||||||
scoped_ptr<media::VideoDecodeAccelerator> decoder;
|
for (const auto& create_vda_function : create_vda_fps) {
|
||||||
-#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
|
+ VLOG(1) << "Testing create_vda_function.";
|
||||||
+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
|
video_decode_accelerator_ = (this->*create_vda_function)();
|
||||||
scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
|
if (!video_decode_accelerator_ ||
|
||||||
if (device.get()) {
|
!video_decode_accelerator_->Initialize(profile, this))
|
||||||
decoder.reset(new V4L2SliceVideoDecodeAccelerator(
|
continue;
|
||||||
@@ -438,7 +438,7 @@ void GpuVideoDecodeAccelerator::BindImage(uint32 client_texture_id,
|
|
||||||
|
+ VLOG(1) << "Initialization successful.";
|
||||||
|
+
|
||||||
|
if (video_decode_accelerator_->CanDecodeOnIOThread()) {
|
||||||
|
filter_ = new MessageFilter(this, host_route_id_);
|
||||||
|
stub_->channel()->AddFilter(filter_.get());
|
||||||
|
@@ -438,7 +443,9 @@
|
||||||
scoped_ptr<media::VideoDecodeAccelerator>
|
scoped_ptr<media::VideoDecodeAccelerator>
|
||||||
GpuVideoDecodeAccelerator::CreateVaapiVDA() {
|
GpuVideoDecodeAccelerator::CreateVaapiVDA() {
|
||||||
scoped_ptr<media::VideoDecodeAccelerator> decoder;
|
scoped_ptr<media::VideoDecodeAccelerator> decoder;
|
||||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
-#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)
|
+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
|
||||||
|
+ VLOG(1) << "Creating new VAAPI video decode accelerator.";
|
||||||
decoder.reset(new VaapiVideoDecodeAccelerator(
|
decoder.reset(new VaapiVideoDecodeAccelerator(
|
||||||
make_context_current_, base::Bind(&GpuVideoDecodeAccelerator::BindImage,
|
make_context_current_, base::Bind(&GpuVideoDecodeAccelerator::BindImage,
|
||||||
base::Unretained(this))));
|
base::Unretained(this))));
|
||||||
diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc
|
diff -uar chromium-48.0.2564.82.orig/content/common/gpu/media/vaapi_video_decode_accelerator.cc chromium-48.0.2564.82/content/common/gpu/media/vaapi_video_decode_accelerator.cc
|
||||||
index ef14060..d6fcf77 100644
|
--- chromium-48.0.2564.82.orig/content/common/gpu/media/vaapi_video_decode_accelerator.cc 2016-01-20 21:01:21.000000000 +0100
|
||||||
--- a/content/common/gpu/media/gpu_video_encode_accelerator.cc
|
+++ chromium-48.0.2564.82/content/common/gpu/media/vaapi_video_decode_accelerator.cc 2016-01-24 12:37:54.345634163 +0100
|
||||||
+++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc
|
@@ -325,17 +325,17 @@
|
||||||
@@ -20,7 +20,7 @@
|
|
||||||
#include "media/base/limits.h"
|
|
||||||
#include "media/base/video_frame.h"
|
|
||||||
|
|
||||||
|
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 (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) {
|
||||||
|
- DVLOG(1) << "HW video decode acceleration not available without "
|
||||||
|
+ VLOG(1) << "HW video decode acceleration not available without "
|
||||||
|
"DesktopGL (GLX).";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#elif defined(USE_OZONE)
|
||||||
|
if (gfx::GetGLImplementation() != gfx::kGLImplementationEGLGLES2) {
|
||||||
|
- DVLOG(1) << "HW video decode acceleration not available without "
|
||||||
|
+ VLOG(1) << "HW video decode acceleration not available without "
|
||||||
|
<< "EGLGLES2.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@@ -345,7 +345,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;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -362,7 +362,7 @@
|
||||||
|
vp9_accelerator_.reset(new VaapiVP9Accelerator(this, vaapi_wrapper_.get()));
|
||||||
|
decoder_.reset(new VP9Decoder(vp9_accelerator_.get()));
|
||||||
|
} else {
|
||||||
|
- DLOG(ERROR) << "Unsupported profile " << profile;
|
||||||
|
+ VLOG(1) << "Unsupported profile " << profile;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff -uar chromium-48.0.2564.82.orig/content/common/gpu/media/vaapi_wrapper.cc chromium-48.0.2564.82/content/common/gpu/media/vaapi_wrapper.cc
|
||||||
|
--- chromium-48.0.2564.82.orig/content/common/gpu/media/vaapi_wrapper.cc 2016-01-20 21:01:21.000000000 +0100
|
||||||
|
+++ chromium-48.0.2564.82/content/common/gpu/media/vaapi_wrapper.cc 2016-01-24 12:37:54.345634163 +0100
|
||||||
|
@@ -152,7 +152,7 @@
|
||||||
|
VAProfile va_profile,
|
||||||
|
const base::Closure& report_error_to_uma_cb) {
|
||||||
|
if (!profile_infos_.Get().IsProfileSupported(mode, va_profile)) {
|
||||||
|
- DVLOG(1) << "Unsupported va_profile: " << va_profile;
|
||||||
|
+ VLOG(1) << "Unsupported va_profile: " << va_profile;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -311,15 +311,17 @@
|
||||||
|
bool VaapiWrapper::VaInitialize(const base::Closure& report_error_to_uma_cb) {
|
||||||
|
static bool vaapi_functions_initialized = PostSandboxInitialization();
|
||||||
|
if (!vaapi_functions_initialized) {
|
||||||
|
- bool running_on_chromeos = false;
|
||||||
-#if defined(OS_CHROMEOS)
|
-#if defined(OS_CHROMEOS)
|
||||||
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
+ bool error_level_logging = false;
|
||||||
#if defined(USE_V4L2_CODEC)
|
+#if defined(OS_LINUX)
|
||||||
#include "content/common/gpu/media/v4l2_video_encode_accelerator.h"
|
+ error_level_logging = true;
|
||||||
|
+#elif defined(OS_CHROMEOS)
|
||||||
|
// When chrome runs on linux with chromeos=1, do not log error message
|
||||||
|
// without VAAPI libraries.
|
||||||
|
- running_on_chromeos = base::SysInfo::IsRunningOnChromeOS();
|
||||||
|
+ error_level_logging = base::SysInfo::IsRunningOnChromeOS();
|
||||||
#endif
|
#endif
|
||||||
@@ -197,7 +197,7 @@ GpuVideoEncodeAccelerator::CreateVEAFps() {
|
static const char kErrorMsg[] = "Failed to initialize VAAPI libs";
|
||||||
scoped_ptr<media::VideoEncodeAccelerator>
|
- if (running_on_chromeos)
|
||||||
GpuVideoEncodeAccelerator::CreateV4L2VEA() {
|
- LOG(ERROR) << kErrorMsg;
|
||||||
scoped_ptr<media::VideoEncodeAccelerator> encoder;
|
+ if (error_level_logging)
|
||||||
-#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
|
+ VLOG(1) << kErrorMsg;
|
||||||
+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(USE_V4L2_CODEC)
|
else
|
||||||
scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder);
|
DVLOG(1) << kErrorMsg;
|
||||||
if (device)
|
return false;
|
||||||
encoder.reset(new V4L2VideoEncodeAccelerator(device));
|
@@ -390,7 +392,7 @@
|
||||||
@@ -209,7 +209,7 @@ GpuVideoEncodeAccelerator::CreateV4L2VEA() {
|
if (std::find(supported_entrypoints.begin(),
|
||||||
scoped_ptr<media::VideoEncodeAccelerator>
|
supported_entrypoints.end(),
|
||||||
GpuVideoEncodeAccelerator::CreateVaapiVEA() {
|
entrypoint) == supported_entrypoints.end()) {
|
||||||
scoped_ptr<media::VideoEncodeAccelerator> encoder;
|
- DVLOG(1) << "Unsupported entrypoint";
|
||||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
+ VLOG(1) << "Unsupported entrypoint";
|
||||||
+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
|
return false;
|
||||||
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
|
}
|
||||||
if (!cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode))
|
return true;
|
||||||
encoder.reset(new VaapiVideoEncodeAccelerator());
|
@@ -414,8 +416,8 @@
|
||||||
diff --git a/content/common/gpu/media/jpeg_decode_accelerator_unittest.cc b/content/common/gpu/media/jpeg_decode_accelerator_unittest.cc
|
if (attribs[i].type != required_attribs[i].type ||
|
||||||
index fa640b1..09293ef 100644
|
(attribs[i].value & required_attribs[i].value) !=
|
||||||
--- a/content/common/gpu/media/jpeg_decode_accelerator_unittest.cc
|
required_attribs[i].value) {
|
||||||
+++ b/content/common/gpu/media/jpeg_decode_accelerator_unittest.cc
|
- DVLOG(1) << "Unsupported value " << required_attribs[i].value
|
||||||
@@ -23,7 +23,7 @@
|
- << " for attribute type " << required_attribs[i].type;
|
||||||
#include "third_party/libyuv/include/libyuv.h"
|
+ VLOG(1) << "Unsupported value " << required_attribs[i].value
|
||||||
#include "ui/gfx/codec/jpeg_codec.h"
|
+ << " for attribute type " << required_attribs[i].type;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff -uar chromium-48.0.2564.82.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc chromium-48.0.2564.82/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
|
||||||
|
--- chromium-48.0.2564.82.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-01-20 21:01:21.000000000 +0100
|
||||||
|
+++ chromium-48.0.2564.82/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-01-24 12:37:54.345634163 +0100
|
||||||
|
@@ -21,6 +21,8 @@
|
||||||
|
#include "base/logging.h"
|
||||||
|
#include "base/memory/scoped_ptr.h"
|
||||||
|
#include "build/build_config.h"
|
||||||
|
+// Auto-generated for dlopen libva libraries
|
||||||
|
+#include "content/common/gpu/media/va_stubs.h"
|
||||||
|
#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"
|
||||||
|
@@ -31,6 +33,8 @@
|
||||||
|
#include "sandbox/linux/syscall_broker/broker_file_permission.h"
|
||||||
|
#include "sandbox/linux/syscall_broker/broker_process.h"
|
||||||
|
#include "sandbox/linux/system_headers/linux_syscalls.h"
|
||||||
|
+#include "third_party/libva/va/va.h"
|
||||||
|
+#include "third_party/libva/va/va_x11.h"
|
||||||
|
|
||||||
|
using sandbox::arch_seccomp_data;
|
||||||
|
using sandbox::bpf_dsl::Allow;
|
||||||
|
@@ -40,6 +44,11 @@
|
||||||
|
using sandbox::syscall_broker::BrokerProcess;
|
||||||
|
using sandbox::SyscallSets;
|
||||||
|
|
||||||
|
+using content_common_gpu_media::kModuleVa;
|
||||||
|
+using content_common_gpu_media::kModuleVa_x11;
|
||||||
|
+using content_common_gpu_media::InitializeStubs;
|
||||||
|
+using content_common_gpu_media::StubPathMap;
|
||||||
|
+
|
||||||
|
namespace content {
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
@@ -94,7 +103,7 @@
|
||||||
|
|
||||||
|
bool IsAcceleratedVaapiVideoEncodeEnabled() {
|
||||||
|
bool accelerated_encode_enabled = false;
|
||||||
-#if defined(OS_CHROMEOS)
|
-#if defined(OS_CHROMEOS)
|
||||||
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
||||||
#if defined(USE_V4L2_CODEC)
|
const base::CommandLine& command_line =
|
||||||
#include "content/common/gpu/media/v4l2_device.h"
|
*base::CommandLine::ForCurrentProcess();
|
||||||
#include "content/common/gpu/media/v4l2_jpeg_decode_accelerator.h"
|
accelerated_encode_enabled =
|
||||||
@@ -129,10 +129,10 @@ JpegClient::~JpegClient() {
|
@@ -299,27 +308,41 @@
|
||||||
|
// inside the sandbox, so preload them now.
|
||||||
|
if (IsAcceleratedVaapiVideoEncodeEnabled() ||
|
||||||
|
IsAcceleratedVideoDecodeEnabled()) {
|
||||||
|
- const char* I965DrvVideoPath = NULL;
|
||||||
|
- const char* I965HybridDrvVideoPath = NULL;
|
||||||
|
+ VLOG(1) << "Attempting to enable hardware video acceleration.";
|
||||||
|
+ StubPathMap paths;
|
||||||
|
+ paths[kModuleVa].push_back("libva.so.1");
|
||||||
|
+ paths[kModuleVa_x11].push_back("libva-x11.so.1");
|
||||||
|
+ if (!InitializeStubs(paths)) {
|
||||||
|
+ VLOG(1) << "Failed to initialize stubs";
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (IsArchitectureX86_64()) {
|
||||||
|
- I965DrvVideoPath = "/usr/lib64/va/drivers/i965_drv_video.so";
|
||||||
|
- I965HybridDrvVideoPath = "/usr/lib64/va/drivers/hybrid_drv_video.so";
|
||||||
|
- } else if (IsArchitectureI386()) {
|
||||||
|
- I965DrvVideoPath = "/usr/lib/va/drivers/i965_drv_video.so";
|
||||||
|
+ // libva drivers won't get loaded even above two libraries get dlopened.
|
||||||
|
+ // Thus, libva calls will fail after post sandbox stage.
|
||||||
|
+ //
|
||||||
|
+ // To get the va driver loaded before sandboxing, upstream simply dlopen
|
||||||
|
+ // the hard-coded va driver path because ChromeOS is the only platform
|
||||||
|
+ // that Google want to support libva.
|
||||||
|
+ //
|
||||||
|
+ // While generic linux distros ship va driver as anywhere they want.
|
||||||
|
+ // Fortunately, the va driver will be loadded when vaInitialize() get
|
||||||
|
+ // called.
|
||||||
|
+ // So the following code is to call vaInitialize() before sandboxing.
|
||||||
|
+ Display* x_display = XOpenDisplay(NULL);
|
||||||
|
+ VADisplay va_display = vaGetDisplay(x_display);
|
||||||
|
+ if (!vaDisplayIsValid(va_display)) {
|
||||||
|
+ VLOG(1) << "Failed to call vaGetDisplay()";
|
||||||
|
+ return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
- 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);
|
||||||
|
-#if defined(USE_OZONE)
|
||||||
|
- 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);
|
||||||
|
-#endif
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ int major_version, minor_version;
|
||||||
|
+ if (vaInitialize(va_display, &major_version, &minor_version)
|
||||||
|
+ != VA_STATUS_SUCCESS) {
|
||||||
|
+ VLOG(1) << "Failed to call vaInitialize()";
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ } // end of IsAcceleratedVaapiVideoEncodeEnabled() || IsAcceleratedVideoDecodeEnabled()
|
||||||
|
+ } // end of IsArchitectureX86_64() || IsArchitectureI386()
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
diff -uar chromium-48.0.2564.82.orig/content/content_common.gypi chromium-48.0.2564.82/content/content_common.gypi
|
||||||
void JpegClient::CreateJpegDecoder() {
|
--- chromium-48.0.2564.82.orig/content/content_common.gypi 2016-01-20 21:01:21.000000000 +0100
|
||||||
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
+++ chromium-48.0.2564.82/content/content_common.gypi 2016-01-24 12:37:54.346634329 +0100
|
||||||
+#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()) {
|
|
||||||
@@ -568,7 +568,7 @@ int main(int argc, char** argv) {
|
|
||||||
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)
|
|
||||||
content::VaapiWrapper::PreSandboxInitialization();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
|
||||||
index 9a8b774..f759dbd 100644
|
|
||||||
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
|
||||||
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
|
||||||
@@ -58,7 +58,7 @@
|
|
||||||
#if defined(OS_WIN)
|
|
||||||
#include "base/win/windows_version.h"
|
|
||||||
#include "content/common/gpu/media/dxva_video_decode_accelerator.h"
|
|
||||||
-#elif defined(OS_CHROMEOS)
|
|
||||||
+#elif defined(OS_CHROMEOS) || defined(OS_LINUX)
|
|
||||||
#if defined(USE_V4L2_CODEC)
|
|
||||||
#include "content/common/gpu/media/v4l2_device.h"
|
|
||||||
#include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h"
|
|
||||||
@@ -532,7 +532,7 @@ GLRenderingVDAClient::CreateDXVAVDA() {
|
|
||||||
scoped_ptr<media::VideoDecodeAccelerator>
|
|
||||||
GLRenderingVDAClient::CreateV4L2VDA() {
|
|
||||||
scoped_ptr<media::VideoDecodeAccelerator> 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::kDecoder);
|
|
||||||
if (device.get()) {
|
|
||||||
base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr();
|
|
||||||
@@ -549,7 +549,7 @@ GLRenderingVDAClient::CreateV4L2VDA() {
|
|
||||||
scoped_ptr<media::VideoDecodeAccelerator>
|
|
||||||
GLRenderingVDAClient::CreateV4L2SliceVDA() {
|
|
||||||
scoped_ptr<media::VideoDecodeAccelerator> 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::kDecoder);
|
|
||||||
if (device.get()) {
|
|
||||||
base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr();
|
|
||||||
@@ -566,7 +566,7 @@ GLRenderingVDAClient::CreateV4L2SliceVDA() {
|
|
||||||
scoped_ptr<media::VideoDecodeAccelerator>
|
|
||||||
GLRenderingVDAClient::CreateVaapiVDA() {
|
|
||||||
scoped_ptr<media::VideoDecodeAccelerator> 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 VaapiVideoDecodeAccelerator(
|
|
||||||
base::Bind(&DoNothingReturnTrue),
|
|
||||||
base::Bind(&GLRenderingVDAClient::BindImage, base::Unretained(this))));
|
|
||||||
@@ -1650,7 +1650,7 @@ int main(int argc, char **argv) {
|
|
||||||
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)
|
|
||||||
content::VaapiWrapper::PreSandboxInitialization();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
diff --git a/content/common/gpu/media/video_encode_accelerator_unittest.cc b/content/common/gpu/media/video_encode_accelerator_unittest.cc
|
|
||||||
index 1775614..a33b4e5 100644
|
|
||||||
--- a/content/common/gpu/media/video_encode_accelerator_unittest.cc
|
|
||||||
+++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc
|
|
||||||
@@ -40,7 +40,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 "content/common/gpu/media/v4l2_video_encode_accelerator.h"
|
|
||||||
#endif
|
|
||||||
@@ -1044,7 +1044,7 @@ scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateFakeVEA() {
|
|
||||||
|
|
||||||
scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() {
|
|
||||||
scoped_ptr<media::VideoEncodeAccelerator> encoder;
|
|
||||||
-#if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \
|
|
||||||
+#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)
|
|
||||||
@@ -1055,7 +1055,7 @@ scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() {
|
|
||||||
|
|
||||||
scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateVaapiVEA() {
|
|
||||||
scoped_ptr<media::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.Pass();
|
|
||||||
@@ -1761,7 +1761,7 @@ int main(int argc, char** argv) {
|
|
||||||
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)
|
|
||||||
content::VaapiWrapper::PreSandboxInitialization();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
diff --git a/content/content_common.gypi b/content/content_common.gypi
|
|
||||||
index f9236da..ad1654d 100644
|
|
||||||
--- a/content/content_common.gypi
|
|
||||||
+++ b/content/content_common.gypi
|
|
||||||
@@ -821,7 +821,7 @@
|
|
||||||
'public/common/webrtc_ip_handling_policy.h',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
- ['use_v4lplugin==1 and chromeos==1', {
|
|
||||||
+ ['use_v4lplugin==1 and (chromeos==1 or desktop_linux==1)', {
|
|
||||||
'defines': [
|
|
||||||
'USE_LIBV4L2'
|
|
||||||
],
|
|
||||||
@@ -865,7 +865,7 @@
|
@@ -865,7 +865,7 @@
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
- ['chromeos==1', {
|
- ['chromeos==1', {
|
||||||
+ ['(chromeos==1 or desktop_linux==1)', {
|
+ ['chromeos==1 or desktop_linux==1', {
|
||||||
'sources': [
|
'sources': [
|
||||||
'common/gpu/media/accelerated_video_decoder.h',
|
'common/gpu/media/accelerated_video_decoder.h',
|
||||||
'common/gpu/media/h264_decoder.cc',
|
'common/gpu/media/h264_decoder.cc',
|
||||||
@@ -882,7 +882,7 @@
|
@@ -921,7 +921,7 @@
|
||||||
'common/gpu/media/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'
|
|
||||||
@@ -915,13 +915,13 @@
|
|
||||||
'<(DEPTH)/third_party/khronos',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
- ['target_arch == "arm" and chromeos == 1', {
|
|
||||||
+ ['target_arch == "arm" and (chromeos == 1 or desktop_linux == 1)', {
|
|
||||||
'sources': [
|
|
||||||
'common/gpu/media/tegra_v4l2_device.cc',
|
|
||||||
'common/gpu/media/tegra_v4l2_device.h',
|
'common/gpu/media/tegra_v4l2_device.h',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
@ -280,10 +309,9 @@ index f9236da..ad1654d 100644
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'../media/media.gyp:media',
|
'../media/media.gyp:media',
|
||||||
'../third_party/libyuv/libyuv.gyp:libyuv',
|
'../third_party/libyuv/libyuv.gyp:libyuv',
|
||||||
diff --git a/content/content_gpu.gypi b/content/content_gpu.gypi
|
diff -uar chromium-48.0.2564.82.orig/content/content_gpu.gypi chromium-48.0.2564.82/content/content_gpu.gypi
|
||||||
index 5516ed4..ff2f410 100644
|
--- chromium-48.0.2564.82.orig/content/content_gpu.gypi 2016-01-14 02:49:23.000000000 +0100
|
||||||
--- a/content/content_gpu.gypi
|
+++ chromium-48.0.2564.82/content/content_gpu.gypi 2016-01-24 12:37:54.346634329 +0100
|
||||||
+++ b/content/content_gpu.gypi
|
|
||||||
@@ -38,7 +38,7 @@
|
@@ -38,7 +38,7 @@
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -293,28 +321,9 @@ index 5516ed4..ff2f410 100644
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'<(DEPTH)/third_party/libva',
|
'<(DEPTH)/third_party/libva',
|
||||||
],
|
],
|
||||||
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
|
diff -uar chromium-48.0.2564.82.orig/content/content_tests.gypi chromium-48.0.2564.82/content/content_tests.gypi
|
||||||
index 929915b..dc7b77e 100644
|
--- chromium-48.0.2564.82.orig/content/content_tests.gypi 2016-01-20 21:01:21.000000000 +0100
|
||||||
--- a/content/content_tests.gypi
|
+++ chromium-48.0.2564.82/content/content_tests.gypi 2016-01-24 12:37:54.346634329 +0100
|
||||||
+++ b/content/content_tests.gypi
|
|
||||||
@@ -1652,7 +1652,7 @@
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
- ['chromeos==1 or OS=="win" or OS=="android"', {
|
|
||||||
+ ['(chromeos==1 or desktop_linux==1) or OS=="win" or OS=="android"', {
|
|
||||||
'targets': [
|
|
||||||
{
|
|
||||||
'target_name': 'video_decode_accelerator_unittest',
|
|
||||||
@@ -1721,7 +1721,7 @@
|
|
||||||
'../ui/gfx/x/gfx_x11.gyp:gfx_x11',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
- ['use_ozone==1 and chromeos==1', {
|
|
||||||
+ ['use_ozone==1 and (chromeos==1 or desktop_linux == 1)', {
|
|
||||||
'dependencies': [
|
|
||||||
'../ui/display/display.gyp:display', # Used by rendering_helper.cc
|
|
||||||
'../ui/ozone/ozone.gyp:ozone', # Used by rendering_helper.cc
|
|
||||||
@@ -1733,7 +1733,7 @@
|
@@ -1733,7 +1733,7 @@
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -324,20 +333,31 @@ index 929915b..dc7b77e 100644
|
||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
'target_name': 'vaapi_jpeg_decoder_unittest',
|
'target_name': 'vaapi_jpeg_decoder_unittest',
|
||||||
@@ -1765,7 +1765,7 @@
|
diff -uar chromium-48.0.2564.82.orig/content/gpu/gpu_main.cc chromium-48.0.2564.82/content/gpu/gpu_main.cc
|
||||||
}
|
--- chromium-48.0.2564.82.orig/content/gpu/gpu_main.cc 2016-01-20 21:01:21.000000000 +0100
|
||||||
]
|
+++ chromium-48.0.2564.82/content/gpu/gpu_main.cc 2016-01-24 12:37:54.347634495 +0100
|
||||||
}],
|
@@ -72,7 +72,7 @@
|
||||||
- ['chromeos==1', {
|
#include "content/common/sandbox_mac.h"
|
||||||
+ ['chromeos==1 or desktop_linux==1', {
|
#endif
|
||||||
'targets': [
|
|
||||||
{
|
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
||||||
'target_name': 'video_encode_accelerator_unittest',
|
+#if (defined(OS_CHROMEOS) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_FAMILY)
|
||||||
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
|
#include "content/common/gpu/media/vaapi_wrapper.h"
|
||||||
index c449382..05ce87a 100644
|
#endif
|
||||||
--- a/content/public/common/content_switches.cc
|
|
||||||
+++ b/content/public/common/content_switches.cc
|
@@ -237,7 +237,7 @@
|
||||||
@@ -931,7 +931,9 @@ const char kDisableWebAudio[] = "disable-webaudio";
|
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)
|
||||||
|
VaapiWrapper::PreSandboxInitialization();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
diff -uar chromium-48.0.2564.82.orig/content/public/common/content_switches.cc chromium-48.0.2564.82/content/public/common/content_switches.cc
|
||||||
|
--- chromium-48.0.2564.82.orig/content/public/common/content_switches.cc 2016-01-20 21:01:21.000000000 +0100
|
||||||
|
+++ chromium-48.0.2564.82/content/public/common/content_switches.cc 2016-01-24 12:37:54.347634495 +0100
|
||||||
|
@@ -931,7 +931,9 @@
|
||||||
#if defined(OS_CHROMEOS)
|
#if defined(OS_CHROMEOS)
|
||||||
// Disables panel fitting (used for mirror mode).
|
// Disables panel fitting (used for mirror mode).
|
||||||
const char kDisablePanelFitting[] = "disable-panel-fitting";
|
const char kDisablePanelFitting[] = "disable-panel-fitting";
|
||||||
|
@ -347,24 +367,54 @@ index c449382..05ce87a 100644
|
||||||
// Disables VA-API accelerated video encode.
|
// Disables VA-API accelerated video encode.
|
||||||
const char kDisableVaapiAcceleratedVideoEncode[] =
|
const char kDisableVaapiAcceleratedVideoEncode[] =
|
||||||
"disable-vaapi-accelerated-video-encode";
|
"disable-vaapi-accelerated-video-encode";
|
||||||
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
|
diff -uar chromium-48.0.2564.82.orig/content/public/common/content_switches.h chromium-48.0.2564.82/content/public/common/content_switches.h
|
||||||
index 9bd5dbd..2341f47 100644
|
--- chromium-48.0.2564.82.orig/content/public/common/content_switches.h 2016-01-20 21:01:21.000000000 +0100
|
||||||
--- a/content/public/common/content_switches.h
|
+++ chromium-48.0.2564.82/content/public/common/content_switches.h 2016-01-24 12:37:54.347634495 +0100
|
||||||
+++ b/content/public/common/content_switches.h
|
@@ -275,6 +275,8 @@
|
||||||
@@ -275,6 +275,9 @@ CONTENT_EXPORT extern const char kDisableWebAudio[];
|
|
||||||
|
|
||||||
#if defined(OS_CHROMEOS)
|
#if defined(OS_CHROMEOS)
|
||||||
CONTENT_EXPORT extern const char kDisablePanelFitting[];
|
CONTENT_EXPORT extern const char kDisablePanelFitting[];
|
||||||
+#endif
|
+#endif
|
||||||
+
|
|
||||||
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
||||||
CONTENT_EXPORT extern const char kDisableVaapiAcceleratedVideoEncode[];
|
CONTENT_EXPORT extern const char kDisableVaapiAcceleratedVideoEncode[];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
diff --git a/media/media.gyp b/media/media.gyp
|
diff -uar chromium-48.0.2564.82.orig/gpu/config/software_rendering_list_json.cc chromium-48.0.2564.82/gpu/config/software_rendering_list_json.cc
|
||||||
index b56a23b..b643096 100644
|
--- chromium-48.0.2564.82.orig/gpu/config/software_rendering_list_json.cc 2016-01-20 21:01:22.000000000 +0100
|
||||||
--- a/media/media.gyp
|
+++ chromium-48.0.2564.82/gpu/config/software_rendering_list_json.cc 2016-01-24 12:43:07.497683578 +0100
|
||||||
+++ b/media/media.gyp
|
@@ -481,17 +481,6 @@
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
- "id": 48,
|
||||||
|
- "description": "Accelerated video decode is unavailable on Linux",
|
||||||
|
- "cr_bugs": [137247],
|
||||||
|
- "os": {
|
||||||
|
- "type": "linux"
|
||||||
|
- },
|
||||||
|
- "features": [
|
||||||
|
- "accelerated_video_decode"
|
||||||
|
- ]
|
||||||
|
- },
|
||||||
|
- {
|
||||||
|
"id": 49,
|
||||||
|
"description": "NVidia GeForce GT 650M can cause the system to hang with flash 3D",
|
||||||
|
"cr_bugs": [140175],
|
||||||
|
@@ -1041,6 +1030,11 @@
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
+ "os": {
|
||||||
|
+ "type": "linux"
|
||||||
|
+ }
|
||||||
|
+ },
|
||||||
|
+ {
|
||||||
|
"os": {
|
||||||
|
"type": "android"
|
||||||
|
},
|
||||||
|
diff -uar chromium-48.0.2564.82.orig/media/media.gyp chromium-48.0.2564.82/media/media.gyp
|
||||||
|
--- chromium-48.0.2564.82.orig/media/media.gyp 2016-01-20 21:01:22.000000000 +0100
|
||||||
|
+++ chromium-48.0.2564.82/media/media.gyp 2016-01-24 12:37:54.365637487 +0100
|
||||||
@@ -764,7 +764,7 @@
|
@@ -764,7 +764,7 @@
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
|
Loading…
Add table
Reference in a new issue