| 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 #include <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 #if defined(OS_MACOSX) | 71 #if defined(OS_MACOSX) |
| 72 #include "base/message_loop/message_pump_mac.h" | 72 #include "base/message_loop/message_pump_mac.h" |
| 73 #include "content/common/sandbox_mac.h" | 73 #include "content/common/sandbox_mac.h" |
| 74 #endif | 74 #endif |
| 75 | 75 |
| 76 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 76 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| 77 #include "content/common/gpu/media/vaapi_wrapper.h" | 77 #include "content/common/gpu/media/vaapi_wrapper.h" |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 #if defined(ENABLE_VULKAN) | |
| 81 #include "gpu/vulkan/vulkan_surface.h" | |
| 82 #endif | |
| 83 | |
| 84 #if defined(SANITIZER_COVERAGE) | 80 #if defined(SANITIZER_COVERAGE) |
| 85 #include <sanitizer/common_interface_defs.h> | 81 #include <sanitizer/common_interface_defs.h> |
| 86 #include <sanitizer/coverage_interface.h> | 82 #include <sanitizer/coverage_interface.h> |
| 87 #endif | 83 #endif |
| 88 | 84 |
| 89 #if defined(CYGPROFILE_INSTRUMENTATION) | 85 #if defined(CYGPROFILE_INSTRUMENTATION) |
| 90 const int kGpuTimeout = 30000; | 86 const int kGpuTimeout = 30000; |
| 91 #else | 87 #else |
| 92 const int kGpuTimeout = 10000; | 88 const int kGpuTimeout = 10000; |
| 93 #endif | 89 #endif |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 // is called from the sandbox warmup code before getting here. | 278 // is called from the sandbox warmup code before getting here. |
| 283 gl_already_initialized = true; | 279 gl_already_initialized = true; |
| 284 } | 280 } |
| 285 #endif | 281 #endif |
| 286 if (command_line.HasSwitch(switches::kInProcessGPU)) { | 282 if (command_line.HasSwitch(switches::kInProcessGPU)) { |
| 287 // With in-process GPU, GLSurface::InitializeOneOff() is called from | 283 // With in-process GPU, GLSurface::InitializeOneOff() is called from |
| 288 // GpuChildThread before getting here. | 284 // GpuChildThread before getting here. |
| 289 gl_already_initialized = true; | 285 gl_already_initialized = true; |
| 290 } | 286 } |
| 291 | 287 |
| 292 #if defined(ENABLE_VULKAN) | |
| 293 // Temporary Vulkan initialization injection. | |
| 294 gpu::VulkanSurface::InitializeOneOff(); | |
| 295 #endif | |
| 296 | |
| 297 // Load and initialize the GL implementation and locate the GL entry points. | 288 // Load and initialize the GL implementation and locate the GL entry points. |
| 298 bool gl_initialized = | 289 bool gl_initialized = |
| 299 gl_already_initialized | 290 gl_already_initialized |
| 300 ? gfx::GetGLImplementation() != gfx::kGLImplementationNone | 291 ? gfx::GetGLImplementation() != gfx::kGLImplementationNone |
| 301 : gfx::GLSurface::InitializeOneOff(); | 292 : gfx::GLSurface::InitializeOneOff(); |
| 302 if (gl_initialized) { | 293 if (gl_initialized) { |
| 303 // We need to collect GL strings (VENDOR, RENDERER) for blacklisting | 294 // We need to collect GL strings (VENDOR, RENDERER) for blacklisting |
| 304 // purposes. However, on Mac we don't actually use them. As documented in | 295 // purposes. However, on Mac we don't actually use them. As documented in |
| 305 // crbug.com/222934, due to some driver issues, glGetString could take | 296 // crbug.com/222934, due to some driver issues, glGetString could take |
| 306 // multiple seconds to finish, which in turn cause the GPU process to | 297 // multiple seconds to finish, which in turn cause the GPU process to |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 return true; | 583 return true; |
| 593 } | 584 } |
| 594 | 585 |
| 595 return false; | 586 return false; |
| 596 } | 587 } |
| 597 #endif // defined(OS_WIN) | 588 #endif // defined(OS_WIN) |
| 598 | 589 |
| 599 } // namespace. | 590 } // namespace. |
| 600 | 591 |
| 601 } // namespace content | 592 } // namespace content |
| OLD | NEW |