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

Unified Diff: content/browser/browser_main_loop.cc

Issue 1120873002: Re-land: content: Single process support for native GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dm-browsertests-refactor
Patch Set: disable test for now Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 0cf536722343455b1d40cddf387ffaf1a119f75b..9f189debd0ceaca3e2eab3ef833a28ec0600e7bb 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -86,6 +86,7 @@
#include "base/android/jni_android.h"
#include "content/browser/android/browser_startup_controller.h"
#include "content/browser/android/browser_surface_texture_manager.h"
+#include "content/browser/android/in_process_surface_texture_manager.h"
#include "content/browser/android/tracing_controller_android.h"
#include "content/browser/screen_orientation/screen_orientation_delegate_android.h"
#include "content/public/browser/screen_orientation_provider.h"
@@ -102,6 +103,7 @@
#include "content/browser/browser_io_surface_manager_mac.h"
#include "content/browser/cocoa/system_hotkey_helper_mac.h"
#include "content/browser/compositor/browser_compositor_view_mac.h"
+#include "content/browser/in_process_io_surface_manager_mac.h"
#include "content/browser/theme_helper_mac.h"
#endif
@@ -589,7 +591,13 @@ void BrowserMainLoop::PostMainMessageLoopStart() {
#if defined(OS_ANDROID)
{
TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager");
- SurfaceTextureManager::SetInstance(new BrowserSurfaceTextureManager);
+ if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) {
+ SurfaceTextureManager::SetInstance(
+ InProcessSurfaceTextureManager::GetInstance());
+ } else {
+ SurfaceTextureManager::SetInstance(
+ BrowserSurfaceTextureManager::GetInstance());
+ }
}
if (!parsed_command_line_.HasSwitch(
@@ -605,7 +613,11 @@ void BrowserMainLoop::PostMainMessageLoopStart() {
#if defined(OS_MACOSX) && !defined(OS_IOS)
{
TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:IOSurfaceManager");
- IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance());
+ if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) {
+ IOSurfaceManager::SetInstance(InProcessIOSurfaceManager::GetInstance());
+ } else {
+ IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance());
+ }
}
#endif
« no previous file with comments | « content/browser/browser_io_surface_manager_mac.h ('k') | content/browser/in_process_io_surface_manager_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698