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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 1892303003: Added the Vulkan Context Provider implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed gyp file Created 4 years, 8 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
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 "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL) 179 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL)
180 #include "crypto/nss_util.h" 180 #include "crypto/nss_util.h"
181 #endif 181 #endif
182 182
183 #if defined(MOJO_SHELL_CLIENT) 183 #if defined(MOJO_SHELL_CLIENT)
184 #include "services/shell/public/cpp/connector.h" 184 #include "services/shell/public/cpp/connector.h"
185 #include "ui/views/mus/window_manager_connection.h" 185 #include "ui/views/mus/window_manager_connection.h"
186 #endif 186 #endif
187 187
188 #if defined(ENABLE_VULKAN)
189 #include "gpu/vulkan/vulkan_implementation.h"
190 #endif
191
188 // One of the linux specific headers defines this as a macro. 192 // One of the linux specific headers defines this as a macro.
189 #ifdef DestroyAll 193 #ifdef DestroyAll
190 #undef DestroyAll 194 #undef DestroyAll
191 #endif 195 #endif
192 196
193 namespace content { 197 namespace content {
194 namespace { 198 namespace {
195 199
196 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 200 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
197 void SetupSandbox(const base::CommandLine& parsed_command_line) { 201 void SetupSandbox(const base::CommandLine& parsed_command_line) {
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 #if defined (MOJO_SHELL_CLIENT) 1211 #if defined (MOJO_SHELL_CLIENT)
1208 use_mus_in_renderer = base::CommandLine::ForCurrentProcess()->HasSwitch( 1212 use_mus_in_renderer = base::CommandLine::ForCurrentProcess()->HasSwitch(
1209 switches::kUseMusInRenderer); 1213 switches::kUseMusInRenderer);
1210 #endif // defined(MOJO_SHELL_CLIENT); 1214 #endif // defined(MOJO_SHELL_CLIENT);
1211 if (aura::Env::GetInstance() && !use_mus_in_renderer) { 1215 if (aura::Env::GetInstance() && !use_mus_in_renderer) {
1212 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); 1216 aura::Env::GetInstance()->set_context_factory(GetContextFactory());
1213 } 1217 }
1214 #endif // defined(USE_AURA) 1218 #endif // defined(USE_AURA)
1215 #endif // defined(OS_ANDROID) 1219 #endif // defined(OS_ANDROID)
1216 1220
1221 #if defined(ENABLE_VULKAN)
1222 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1223 switches::kEnableVulkan)) {
1224 gpu::InitializeVulkan();
1225 }
1226 #endif
piman 2016/04/19 23:42:02 nit: move to before ImageTransportFactory::Initial
David Yen 2016/04/20 17:37:38 Done.
1227
1217 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that 1228 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that
1218 // unregistration happens on the IO thread (See 1229 // unregistration happens on the IO thread (See
1219 // BrowserProcessSubThread::IOThreadPreCleanUp). 1230 // BrowserProcessSubThread::IOThreadPreCleanUp).
1220 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 1231 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
1221 BrowserGpuMemoryBufferManager::current(), "BrowserGpuMemoryBufferManager", 1232 BrowserGpuMemoryBufferManager::current(), "BrowserGpuMemoryBufferManager",
1222 io_thread_->task_runner()); 1233 io_thread_->task_runner());
1223 #if defined(OS_ANDROID) 1234 #if defined(OS_ANDROID)
1224 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 1235 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
1225 tracing::GraphicsMemoryDumpProvider::GetInstance(), "AndroidGraphics", 1236 tracing::GraphicsMemoryDumpProvider::GetInstance(), "AndroidGraphics",
1226 nullptr); 1237 nullptr);
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 audio_task_runner = audio_thread_->task_runner(); 1491 audio_task_runner = audio_thread_->task_runner();
1481 worker_task_runner = audio_thread_->task_runner(); 1492 worker_task_runner = audio_thread_->task_runner();
1482 monitor_task_runner = io_thread_->task_runner(); 1493 monitor_task_runner = io_thread_->task_runner();
1483 #endif // defined(OS_MACOSX) 1494 #endif // defined(OS_MACOSX)
1484 audio_manager_ = media::AudioManager::Create( 1495 audio_manager_ = media::AudioManager::Create(
1485 std::move(audio_task_runner), std::move(worker_task_runner), 1496 std::move(audio_task_runner), std::move(worker_task_runner),
1486 std::move(monitor_task_runner), MediaInternals::GetInstance()); 1497 std::move(monitor_task_runner), MediaInternals::GetInstance());
1487 } 1498 }
1488 1499
1489 } // namespace content 1500 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698