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 8b89d049b9339115a642f008e93f3796be83eb12..36dd7f013cfc2df0c2663106e9fd0fc3ce620068 100644 |
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc |
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc |
@@ -60,9 +60,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 |
@@ -405,17 +402,13 @@ void GLRenderingVDAClient::CreateAndStartDecoder() { |
} |
decoder_.reset(new V4L2VideoDecodeAccelerator( |
static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), |
- static_cast<EGLContext>(rendering_helper_->GetGLContext()), |
- weak_client, |
- base::Bind(&DoNothingReturnTrue), |
- device.Pass(), |
+ 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))); |
+ decoder_.reset( |
+ new VaapiVideoDecodeAccelerator(rendering_helper_->GetGLContext().get(), |
+ base::Bind(&DoNothingReturnTrue))); |
#endif // OS_WIN |
CHECK(decoder_.get()); |
weak_decoder_factory_.reset( |
@@ -873,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 initializes the event system using a UI |
+ // 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(); |
@@ -1438,6 +1433,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; |
} |