Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/public/test/browser_test_base.h" | 5 #include "content/public/test/browser_test_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
| 10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 #include "ui/compositor/compositor_switches.h" | 27 #include "ui/compositor/compositor_switches.h" |
| 28 #include "ui/gl/gl_implementation.h" | 28 #include "ui/gl/gl_implementation.h" |
| 29 #include "ui/gl/gl_switches.h" | 29 #include "ui/gl/gl_switches.h" |
| 30 | 30 |
| 31 #if defined(OS_POSIX) | 31 #if defined(OS_POSIX) |
| 32 #include "base/process/process_handle.h" | 32 #include "base/process/process_handle.h" |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 #if defined(OS_MACOSX) | 35 #if defined(OS_MACOSX) |
| 36 #include "base/mac/foundation_util.h" | 36 #include "base/mac/foundation_util.h" |
| 37 #include "media/base/mac/avfoundation_glue.h" | |
| 37 #endif | 38 #endif |
| 38 | 39 |
| 39 #if defined(OS_ANDROID) | 40 #if defined(OS_ANDROID) |
| 40 #include "base/threading/thread_restrictions.h" | 41 #include "base/threading/thread_restrictions.h" |
| 41 #include "content/public/browser/browser_main_runner.h" | 42 #include "content/public/browser/browser_main_runner.h" |
| 42 #include "content/public/browser/browser_thread.h" | 43 #include "content/public/browser/browser_thread.h" |
| 43 #endif | 44 #endif |
| 44 | 45 |
| 45 #if defined(USE_AURA) | 46 #if defined(USE_AURA) |
| 46 #include "content/browser/compositor/image_transport_factory.h" | 47 #include "content/browser/compositor/image_transport_factory.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 if (command_line->HasSwitch(switches::kUseGpuInTests)) | 219 if (command_line->HasSwitch(switches::kUseGpuInTests)) |
| 219 use_osmesa = false; | 220 use_osmesa = false; |
| 220 | 221 |
| 221 // Some bots pass this flag when they want to use hardware GL. | 222 // Some bots pass this flag when they want to use hardware GL. |
| 222 if (command_line->HasSwitch("enable-gpu")) | 223 if (command_line->HasSwitch("enable-gpu")) |
| 223 use_osmesa = false; | 224 use_osmesa = false; |
| 224 | 225 |
| 225 #if defined(OS_MACOSX) | 226 #if defined(OS_MACOSX) |
| 226 // On Mac we always use hardware GL. | 227 // On Mac we always use hardware GL. |
| 227 use_osmesa = false; | 228 use_osmesa = false; |
| 229 | |
| 230 // Initialize AVFoundation if supported, for audio and video. | |
|
jam
2015/05/27 14:54:37
I just remembered that content's browser's initial
tommi (sloooow) - chröme
2015/05/27 15:54:53
Thanks. Reverted.
| |
| 231 AVFoundationGlue::InitializeAVFoundation(); | |
| 228 #endif | 232 #endif |
| 229 | 233 |
| 230 #if defined(OS_ANDROID) | 234 #if defined(OS_ANDROID) |
| 231 // On Android we always use hardware GL. | 235 // On Android we always use hardware GL. |
| 232 use_osmesa = false; | 236 use_osmesa = false; |
| 233 #endif | 237 #endif |
| 234 | 238 |
| 235 #if defined(OS_CHROMEOS) | 239 #if defined(OS_CHROMEOS) |
| 236 // If the test is running on the chromeos envrionment (such as | 240 // If the test is running on the chromeos envrionment (such as |
| 237 // device or vm bots), we use hardware GL. | 241 // device or vm bots), we use hardware GL. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 use_software_compositing_ = true; | 351 use_software_compositing_ = true; |
| 348 } | 352 } |
| 349 | 353 |
| 350 bool BrowserTestBase::UsingOSMesa() const { | 354 bool BrowserTestBase::UsingOSMesa() const { |
| 351 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 355 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
| 352 return cmd->GetSwitchValueASCII(switches::kUseGL) == | 356 return cmd->GetSwitchValueASCII(switches::kUseGL) == |
| 353 gfx::kGLImplementationOSMesaName; | 357 gfx::kGLImplementationOSMesaName; |
| 354 } | 358 } |
| 355 | 359 |
| 356 } // namespace content | 360 } // namespace content |
| OLD | NEW |