OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // The bulk of this file is support code; sorry about that. Here's an overview | 5 // The bulk of this file is support code; sorry about that. Here's an overview |
6 // to hopefully help readers of this code: | 6 // to hopefully help readers of this code: |
7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or | 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or |
8 // Win/EGL. | 8 // Win/EGL. |
9 // - ClientState is an enum for the state of the decode client used by the test. | 9 // - ClientState is an enum for the state of the decode client used by the test. |
10 // - ClientStateNotification is a barrier abstraction that allows the test code | 10 // - ClientStateNotification is a barrier abstraction that allows the test code |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
967 | 967 |
968 CommandLine::SwitchMap switches = cmd_line->GetSwitches(); | 968 CommandLine::SwitchMap switches = cmd_line->GetSwitches(); |
969 for (CommandLine::SwitchMap::const_iterator it = switches.begin(); | 969 for (CommandLine::SwitchMap::const_iterator it = switches.begin(); |
970 it != switches.end(); ++it) { | 970 it != switches.end(); ++it) { |
971 if (it->first == "test_video_data") { | 971 if (it->first == "test_video_data") { |
972 content::test_video_data = it->second.c_str(); | 972 content::test_video_data = it->second.c_str(); |
973 continue; | 973 continue; |
974 } | 974 } |
975 if (it->first == "v" || it->first == "vmodule") | 975 if (it->first == "v" || it->first == "vmodule") |
976 continue; | 976 continue; |
977 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 977 if (it->first == switches::kUseExynosVda) { |
978 if (it->first == switches::kUseExynosVda) | 978 #if !defined(OS_CHROMEOS) || !defined(ARCH_CPU_ARMEL) |
979 LOG(WARNING) << "Unsupported switch: " << it->first << ", ignored"; | |
980 #endif | |
979 continue; | 981 continue; |
980 #endif | 982 } |
981 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 983 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
982 } | 984 } |
983 | 985 |
984 base::ShadowingAtExitManager at_exit_manager; | 986 base::ShadowingAtExitManager at_exit_manager; |
985 content::RenderingHelper::InitializePlatform(); | 987 content::RenderingHelper::InitializePlatform(); |
986 | 988 |
987 #if defined(OS_WIN) | 989 #if defined(OS_WIN) |
988 content::DXVAVideoDecodeAccelerator::PreSandboxInitialization(); | 990 content::DXVAVideoDecodeAccelerator::PreSandboxInitialization(); |
989 #elif defined(OS_CHROMEOS) | 991 #elif defined(OS_CHROMEOS) |
990 #if defined(ARCH_CPU_ARMEL) | 992 #if defined(ARCH_CPU_ARMEL) |
991 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda)) | 993 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda)) |
yuli
2013/03/28 02:42:45
Just fyr, how about changing use-exynos to use-omx
| |
992 content::ExynosVideoDecodeAccelerator::PreSandboxInitialization(); | 994 content::ExynosVideoDecodeAccelerator::PreSandboxInitialization(); |
993 else | 995 else |
994 content::OmxVideoDecodeAccelerator::PreSandboxInitialization(); | 996 content::OmxVideoDecodeAccelerator::PreSandboxInitialization(); |
995 #elif defined(ARCH_CPU_X86_FAMILY) | 997 #elif defined(ARCH_CPU_X86_FAMILY) |
996 content::VaapiVideoDecodeAccelerator::PreSandboxInitialization(); | 998 content::VaapiVideoDecodeAccelerator::PreSandboxInitialization(); |
997 #endif // ARCH_CPU_ARMEL | 999 #endif // ARCH_CPU_ARMEL |
998 #endif // OS_CHROMEOS | 1000 #endif // OS_CHROMEOS |
999 | 1001 |
1000 return RUN_ALL_TESTS(); | 1002 return RUN_ALL_TESTS(); |
1001 } | 1003 } |
OLD | NEW |