| Index: content/common/gpu/media/video_encode_accelerator_unittest.cc
|
| diff --git a/content/common/gpu/media/video_encode_accelerator_unittest.cc b/content/common/gpu/media/video_encode_accelerator_unittest.cc
|
| index 2921ed07483cb97db93d3c343833b9e8d1c34456..7bb1ec7d02cbabeddcba32665724ba11820fb177 100644
|
| --- a/content/common/gpu/media/video_encode_accelerator_unittest.cc
|
| +++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc
|
| @@ -22,13 +22,13 @@
|
| #include "media/video/video_encode_accelerator.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| -#if defined(USE_X11)
|
| -#include "ui/gfx/x/x11_types.h"
|
| +#if defined(USE_OZONE)
|
| +#include "ui/ozone/public/ozone_platform.h"
|
| #endif
|
|
|
| #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
|
| #include "content/common/gpu/media/v4l2_video_encode_accelerator.h"
|
| -#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
|
| +#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
| #include "content/common/gpu/media/vaapi_video_encode_accelerator.h"
|
| #else
|
| #error The VideoEncodeAcceleratorUnittest is not supported on this platform.
|
| @@ -716,8 +716,8 @@ void VEAClient::CreateEncoder() {
|
| #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
|
| scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder);
|
| encoder_.reset(new V4L2VideoEncodeAccelerator(device.Pass()));
|
| -#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
|
| - encoder_.reset(new VaapiVideoEncodeAccelerator(gfx::GetXDisplay()));
|
| +#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
| + encoder_.reset(new VaapiVideoEncodeAccelerator());
|
| #endif
|
|
|
| SetState(CS_ENCODER_SET);
|
| @@ -1247,6 +1247,11 @@ int main(int argc, char** argv) {
|
| testing::InitGoogleTest(&argc, argv); // Removes gtest-specific args.
|
| base::CommandLine::Init(argc, argv);
|
|
|
| +#if defined(USE_OZONE)
|
| + ui::OzonePlatform::InitializeForUI();
|
| + ui::OzonePlatform::InitializeForGPU();
|
| +#endif
|
| +
|
| base::ShadowingAtExitManager at_exit_manager;
|
| scoped_ptr<base::FilePath::StringType> test_stream_data(
|
| new base::FilePath::StringType(
|
| @@ -1271,6 +1276,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;
|
| }
|
|
|
|
|