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

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: Missing modifications in video accelerators Created 6 years, 2 months 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 23af266661b70e9ebcb01a78d028298381a9a538..d87a24c06625194da16110e46624ba30d2ae44c4 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.
@@ -587,8 +587,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);
@@ -1031,6 +1031,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/10/08 08:17:23 There is no rendering in this test. Do we need the
llandwerlin-old 2014/10/08 09:31:18 Not sure what you call rendering, but this test pa
Pawel Osciak 2014/10/26 13:06:46 This is the encoder test, I think you are mistakin
llandwerlin-old 2014/10/29 13:52:47 Ah right, I misread the file name. Though I need t
+ ui::OzonePlatform::InitializeForGPU();
+#endif
+
base::ShadowingAtExitManager at_exit_manager;
scoped_ptr<base::FilePath::StringType> test_stream_data(
new base::FilePath::StringType(
@@ -1056,6 +1061,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