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

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

Issue 1139903005: Add PERSISTENT_MAP usage for GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: persistentmap: rebase Created 5 years, 7 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 | « no previous file | content/browser/compositor/gpu_process_transport_factory.cc » ('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 "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.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/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/memory_pressure_monitor.h" 10 #include "base/memory/memory_pressure_monitor.h"
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 size_t process_limit; 462 size_t process_limit;
463 if (base::StringToSizeT(limit_string, &process_limit)) { 463 if (base::StringToSizeT(limit_string, &process_limit)) {
464 RenderProcessHost::SetMaxRendererProcessCount(process_limit); 464 RenderProcessHost::SetMaxRendererProcessCount(process_limit);
465 } 465 }
466 } 466 }
467 #endif // !defined(OS_IOS) 467 #endif // !defined(OS_IOS)
468 468
469 if (parsed_command_line_.HasSwitch(switches::kEnableNativeGpuMemoryBuffers)) { 469 if (parsed_command_line_.HasSwitch(switches::kEnableNativeGpuMemoryBuffers)) {
470 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( 470 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage(
471 gfx::GpuMemoryBuffer::MAP); 471 gfx::GpuMemoryBuffer::MAP);
472 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage(
473 gfx::GpuMemoryBuffer::PERSISTENT_MAP);
472 } 474 }
473 475
474 #if defined(USE_OZONE) 476 #if defined(USE_OZONE)
475 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( 477 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage(
476 gfx::GpuMemoryBuffer::SCANOUT); 478 gfx::GpuMemoryBuffer::SCANOUT);
477 #endif 479 #endif
478 480
479 base::DiscardableMemoryAllocator::SetInstance( 481 base::DiscardableMemoryAllocator::SetInstance(
480 HostDiscardableSharedMemoryManager::current()); 482 HostDiscardableSharedMemoryManager::current());
481 483
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 1329
1328 void BrowserMainLoop::EndStartupTracing() { 1330 void BrowserMainLoop::EndStartupTracing() {
1329 is_tracing_startup_ = false; 1331 is_tracing_startup_ = false;
1330 TracingController::GetInstance()->DisableRecording( 1332 TracingController::GetInstance()->DisableRecording(
1331 TracingController::CreateFileSink( 1333 TracingController::CreateFileSink(
1332 startup_trace_file_, 1334 startup_trace_file_,
1333 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1335 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1334 } 1336 }
1335 1337
1336 } // namespace content 1338 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698