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

Side by Side Diff: content/gpu/gpu_main.cc

Issue 1726303002: Added initial Vulkan build files as well as a basic implementation file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed namespace to gpu:: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | gpu/vulkan/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 #if defined(OS_MACOSX) 74 #if defined(OS_MACOSX)
75 #include "base/message_loop/message_pump_mac.h" 75 #include "base/message_loop/message_pump_mac.h"
76 #include "content/common/sandbox_mac.h" 76 #include "content/common/sandbox_mac.h"
77 #endif 77 #endif
78 78
79 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) 79 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
80 #include "content/common/gpu/media/vaapi_wrapper.h" 80 #include "content/common/gpu/media/vaapi_wrapper.h"
81 #endif 81 #endif
82 82
83 #if defined(ENABLE_VULKAN)
84 #include "gpu/vulkan/vulkan_surface.h"
85 #endif
86
83 #if defined(SANITIZER_COVERAGE) 87 #if defined(SANITIZER_COVERAGE)
84 #include <sanitizer/common_interface_defs.h> 88 #include <sanitizer/common_interface_defs.h>
85 #include <sanitizer/coverage_interface.h> 89 #include <sanitizer/coverage_interface.h>
86 #endif 90 #endif
87 91
88 #if defined(CYGPROFILE_INSTRUMENTATION) 92 #if defined(CYGPROFILE_INSTRUMENTATION)
89 const int kGpuTimeout = 30000; 93 const int kGpuTimeout = 30000;
90 #else 94 #else
91 const int kGpuTimeout = 10000; 95 const int kGpuTimeout = 10000;
92 #endif 96 #endif
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // is called from the sandbox warmup code before getting here. 285 // is called from the sandbox warmup code before getting here.
282 gl_already_initialized = true; 286 gl_already_initialized = true;
283 } 287 }
284 #endif 288 #endif
285 if (command_line.HasSwitch(switches::kInProcessGPU)) { 289 if (command_line.HasSwitch(switches::kInProcessGPU)) {
286 // With in-process GPU, GLSurface::InitializeOneOff() is called from 290 // With in-process GPU, GLSurface::InitializeOneOff() is called from
287 // GpuChildThread before getting here. 291 // GpuChildThread before getting here.
288 gl_already_initialized = true; 292 gl_already_initialized = true;
289 } 293 }
290 294
295 #if defined(ENABLE_VULKAN)
296 // Temporary Vulkan initialization injection.
297 gpu::VulkanSurface::InitializeOneOff();
298 #endif
299
291 // Load and initialize the GL implementation and locate the GL entry points. 300 // Load and initialize the GL implementation and locate the GL entry points.
292 bool gl_initialized = 301 bool gl_initialized =
293 gl_already_initialized 302 gl_already_initialized
294 ? gfx::GetGLImplementation() != gfx::kGLImplementationNone 303 ? gfx::GetGLImplementation() != gfx::kGLImplementationNone
295 : gfx::GLSurface::InitializeOneOff(); 304 : gfx::GLSurface::InitializeOneOff();
296 if (gl_initialized) { 305 if (gl_initialized) {
297 // We need to collect GL strings (VENDOR, RENDERER) for blacklisting 306 // We need to collect GL strings (VENDOR, RENDERER) for blacklisting
298 // purposes. However, on Mac we don't actually use them. As documented in 307 // purposes. However, on Mac we don't actually use them. As documented in
299 // crbug.com/222934, due to some driver issues, glGetString could take 308 // crbug.com/222934, due to some driver issues, glGetString could take
300 // multiple seconds to finish, which in turn cause the GPU process to 309 // multiple seconds to finish, which in turn cause the GPU process to
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 return true; 602 return true;
594 } 603 }
595 604
596 return false; 605 return false;
597 } 606 }
598 #endif // defined(OS_WIN) 607 #endif // defined(OS_WIN)
599 608
600 } // namespace. 609 } // namespace.
601 610
602 } // namespace content 611 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | gpu/vulkan/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698