Remove additional protection of kDisableAcceleratedVideoDecode in bpf_gpu_policy_linux.cc.

The blacklist is the way we make features available or not. The control of
accelerated video decode should rely on GPU blacklist.

After this CL, Linux and Mac will output following error message when using --ignore-gpu-blacklist.
"[(pid):ERROR:gpu_video_decode_accelerator.cc(303)] Not implemented reached in void 
content::GpuVideoDecodeAccelerator::Initialize(media::VideoCodecProfile, IPC::Message*)
HW video decode acceleration not available."

In addition, match macro style in video_decode_accelerator_unittest.cc
to gpu_video_decode_accelerator.cc

BUG=N/A

Review URL: https://codereview.chromium.org/176883018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255968 0039d316-1c4b-4281-b951-d872f2087c98
parent 9ffbe3d9
......@@ -54,17 +54,15 @@
#if defined(OS_WIN)
#include "content/common/gpu/media/dxva_video_decode_accelerator.h"
#elif defined(OS_CHROMEOS)
#if defined(ARCH_CPU_ARMEL)
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
#include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
#include "content/common/gpu/media/v4l2_video_device.h"
#elif defined(ARCH_CPU_X86_FAMILY)
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
#include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
#include "content/common/gpu/media/vaapi_wrapper.h"
#if defined(USE_X11)
#include "ui/gl/gl_implementation.h"
#endif // USE_X11
#endif // ARCH_CPU_ARMEL
#else
#error The VideoAccelerator tests are not supported on this platform.
#endif // OS_WIN
......@@ -556,8 +554,7 @@ void GLRenderingVDAClient::CreateAndStartDecoder() {
#if defined(OS_WIN)
decoder_.reset(
new DXVAVideoDecodeAccelerator(base::Bind(&DoNothingReturnTrue)));
#elif defined(OS_CHROMEOS)
#if defined(ARCH_CPU_ARMEL)
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
scoped_ptr<V4L2Device> device = V4L2Device::Create();
if (!device.get()) {
......@@ -570,13 +567,12 @@ void GLRenderingVDAClient::CreateAndStartDecoder() {
base::Bind(&DoNothingReturnTrue),
device.Pass(),
base::MessageLoopProxy::current()));
#elif defined(ARCH_CPU_X86_FAMILY)
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
CHECK_EQ(gfx::kGLImplementationDesktopGL, gfx::GetGLImplementation())
<< "Hardware video decode does not work with OSMesa";
decoder_.reset(new VaapiVideoDecodeAccelerator(
static_cast<Display*>(rendering_helper_->GetGLDisplay()),
base::Bind(&DoNothingReturnTrue)));
#endif // ARCH_CPU_ARMEL
#endif // OS_WIN
CHECK(decoder_.get());
SetState(CS_DECODER_SET);
......
......@@ -73,15 +73,8 @@ inline bool IsArchitectureArm() {
}
bool IsAcceleratedVideoDecodeEnabled() {
// Accelerated video decode is currently enabled on Chrome OS,
// but not on Linux: crbug.com/137247.
bool is_enabled = IsChromeOS();
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
is_enabled &=
!command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode);
return is_enabled;
return !command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode);
}
intptr_t GpuSIGSYS_Handler(const struct arch_seccomp_data& args,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment