Chromium Code Reviews| Index: content/common/gpu/media/video_decode_accelerator_unittest.cc |
| diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc |
| index 07cbcefca143e51afa263ebb1ec41e2c932bf992..cba5068d08d0c53a46c0481cd3c2b601878fc1a0 100644 |
| --- a/content/common/gpu/media/video_decode_accelerator_unittest.cc |
| +++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc |
| @@ -34,7 +34,9 @@ |
| #include "base/files/file_util.h" |
| #include "base/format_macros.h" |
| #include "base/md5.h" |
| +#include "base/message_loop/message_loop.h" |
| #include "base/message_loop/message_loop_proxy.h" |
| +#include "base/message_loop/message_pump_libevent.h" |
| #include "base/process/process.h" |
| #include "base/stl_util.h" |
| #include "base/strings/string_number_conversions.h" |
| @@ -60,9 +62,6 @@ |
| #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 |
| #else |
| #error The VideoAccelerator tests are not supported on this platform. |
| #endif // OS_WIN |
| @@ -402,17 +401,14 @@ void GLRenderingVDAClient::CreateAndStartDecoder() { |
| } |
| decoder_.reset(new V4L2VideoDecodeAccelerator( |
| static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), |
| - static_cast<EGLContext>(rendering_helper_->GetGLContext()), |
| + static_cast<EGLContext>(rendering_helper_->GetGLContextHandle()), |
| weak_client, |
| base::Bind(&DoNothingReturnTrue), |
| device.Pass(), |
| base::MessageLoopProxy::current())); |
| #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))); |
| + rendering_helper_->GetGLContext(), base::Bind(&DoNothingReturnTrue))); |
| #endif // OS_WIN |
| CHECK(decoder_.get()); |
| weak_decoder_factory_.reset( |
| @@ -870,11 +866,13 @@ void VideoDecodeAcceleratorTest::SetUp() { |
| // Initialize the rendering thread. |
| base::Thread::Options options; |
| options.message_loop_type = base::MessageLoop::TYPE_DEFAULT; |
| -#if defined(OS_WIN) |
| +#if defined(OS_WIN) || defined(USE_OZONE) |
| // For windows the decoding thread initializes the media foundation decoder |
| // which uses COM. We need the thread to be a UI thread. |
| + // On Ozone, the backend initialize the event system using a UI |
|
Pawel Osciak
2014/10/26 13:06:48
s/initialize/initializes/
llandwerlin-old
2014/10/29 13:52:49
Acknowledged.
|
| + // thread. |
| options.message_loop_type = base::MessageLoop::TYPE_UI; |
| -#endif // OS_WIN |
| +#endif // OS_WIN || USE_OZONE |
| rendering_thread_.StartWithOptions(options); |
| rendering_loop_proxy_ = rendering_thread_.message_loop_proxy(); |
| @@ -1428,6 +1426,8 @@ int main(int argc, char **argv) { |
| } |
| if (it->first == "v" || it->first == "vmodule") |
| continue; |
| + if (it->first == "ozone-platform" || it->first == "ozone-use-surfaceless") |
| + continue; |
| LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
| } |