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

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: . 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
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 // TODO(reveman): No support for native PERSISTENT_MAP. crbug.com/489438
reveman 2015/05/19 16:12:12 It shouldn't hurt to enable PERSISTENT_MAP here to
danakj 2015/05/19 22:19:43 Done.
472 } 473 }
473 474
474 #if defined(USE_OZONE) 475 #if defined(USE_OZONE)
475 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage( 476 BrowserGpuChannelHostFactory::EnableGpuMemoryBufferFactoryUsage(
476 gfx::GpuMemoryBuffer::SCANOUT); 477 gfx::GpuMemoryBuffer::SCANOUT);
477 #endif 478 #endif
478 479
479 base::DiscardableMemoryAllocator::SetInstance( 480 base::DiscardableMemoryAllocator::SetInstance(
480 HostDiscardableSharedMemoryManager::current()); 481 HostDiscardableSharedMemoryManager::current());
481 482
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 1328
1328 void BrowserMainLoop::EndStartupTracing() { 1329 void BrowserMainLoop::EndStartupTracing() {
1329 is_tracing_startup_ = false; 1330 is_tracing_startup_ = false;
1330 TracingController::GetInstance()->DisableRecording( 1331 TracingController::GetInstance()->DisableRecording(
1331 TracingController::CreateFileSink( 1332 TracingController::CreateFileSink(
1332 startup_trace_file_, 1333 startup_trace_file_,
1333 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1334 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1334 } 1335 }
1335 1336
1336 } // namespace content 1337 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698