Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1127)

Unified Diff: content/common/gpu/media/video_encode_accelerator_unittest.cc

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove picture destruction sequence Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 c4c6339d309a035da5ec61ff459ad4baa1769215..864bf5ac1d09f22cf170ed7ee1cb1d6abadcfc9a 100644
--- a/content/common/gpu/media/video_encode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc
@@ -21,13 +21,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.
@@ -684,8 +684,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);
@@ -1175,6 +1175,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();
Pawel Osciak 2014/12/08 10:55:16 Is this needed? This doesn't display anything, is
llandwerlin-old 2014/12/08 16:42:07 We need the OzoneSurfaceFactory to be initialize i
+ ui::OzonePlatform::InitializeForGPU();
+#endif
+
base::ShadowingAtExitManager at_exit_manager;
scoped_ptr<base::FilePath::StringType> test_stream_data(
new base::FilePath::StringType(
@@ -1199,6 +1204,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;
}

Powered by Google App Engine
This is Rietveld 408576698