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

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

Issue 2525483005: Remove SurfaceTextureManager (Closed)
Patch Set: Updated a comment in GpuSurfaceTracker Created 4 years 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 #if defined(USE_AURA) 107 #if defined(USE_AURA)
108 #include "content/public/browser/context_factory.h" 108 #include "content/public/browser/context_factory.h"
109 #include "ui/aura/env.h" 109 #include "ui/aura/env.h"
110 #endif 110 #endif
111 111
112 #if defined(OS_ANDROID) 112 #if defined(OS_ANDROID)
113 #include "base/android/jni_android.h" 113 #include "base/android/jni_android.h"
114 #include "components/tracing/common/graphics_memory_dump_provider_android.h" 114 #include "components/tracing/common/graphics_memory_dump_provider_android.h"
115 #include "content/browser/android/browser_startup_controller.h" 115 #include "content/browser/android/browser_startup_controller.h"
116 #include "content/browser/android/browser_surface_texture_manager.h"
117 #include "content/browser/android/scoped_surface_request_manager.h" 116 #include "content/browser/android/scoped_surface_request_manager.h"
118 #include "content/browser/android/tracing_controller_android.h" 117 #include "content/browser/android/tracing_controller_android.h"
119 #include "content/browser/media/android/browser_media_player_manager.h" 118 #include "content/browser/media/android/browser_media_player_manager.h"
120 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" 119 #include "content/browser/renderer_host/context_provider_factory_impl_android.h"
121 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" 120 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h"
122 #include "content/public/browser/screen_orientation_provider.h" 121 #include "content/public/browser/screen_orientation_provider.h"
123 #include "gpu/ipc/client/android/in_process_surface_texture_manager.h"
124 #include "media/base/android/media_client_android.h" 122 #include "media/base/android/media_client_android.h"
125 #include "ui/android/screen_android.h" 123 #include "ui/android/screen_android.h"
126 #include "ui/display/screen.h" 124 #include "ui/display/screen.h"
127 #include "ui/gl/gl_surface.h" 125 #include "ui/gl/gl_surface.h"
128 #endif 126 #endif
129 127
130 #if defined(OS_MACOSX) 128 #if defined(OS_MACOSX)
131 #include "base/memory/memory_pressure_monitor_mac.h" 129 #include "base/memory/memory_pressure_monitor_mac.h"
132 #include "content/browser/bootstrap_sandbox_manager_mac.h" 130 #include "content/browser/bootstrap_sandbox_manager_mac.h"
133 #include "content/browser/cocoa/system_hotkey_helper_mac.h" 131 #include "content/browser/cocoa/system_hotkey_helper_mac.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 // starting the main message loop to avoid calling 666 // starting the main message loop to avoid calling
669 // MessagePumpForUI::ScheduleWork() before MessagePumpForUI::Start() as it 667 // MessagePumpForUI::ScheduleWork() before MessagePumpForUI::Start() as it
670 // will crash the browser. 668 // will crash the browser.
671 if (is_tracing_startup_for_duration_) { 669 if (is_tracing_startup_for_duration_) {
672 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracingForDuration"); 670 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracingForDuration");
673 InitStartupTracingForDuration(parsed_command_line_); 671 InitStartupTracingForDuration(parsed_command_line_);
674 } 672 }
675 673
676 #if defined(OS_ANDROID) 674 #if defined(OS_ANDROID)
677 { 675 {
678 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); 676 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager");
tguilbert 2016/12/01 22:46:50 Carrying over this comment from Patch #1. Any sugg
ncarter (slow) 2016/12/01 23:20:08 "BrowserMainLoop::Subsystem:BrowserMediaPlayerMana
tguilbert 2016/12/02 00:01:52 Sounds good. (Although, I will be deleting line 68
679 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) { 677 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) {
680 gpu::SurfaceTextureManager::SetInstance(
681 gpu::InProcessSurfaceTextureManager::GetInstance());
682 gpu::ScopedSurfaceRequestConduit::SetInstance( 678 gpu::ScopedSurfaceRequestConduit::SetInstance(
683 ScopedSurfaceRequestManager::GetInstance()); 679 ScopedSurfaceRequestManager::GetInstance());
684 } else {
685 gpu::SurfaceTextureManager::SetInstance(
686 BrowserSurfaceTextureManager::GetInstance());
687 } 680 }
688 BrowserMediaPlayerManager::InitSurfaceTexturePeer(); 681 BrowserMediaPlayerManager::InitSurfaceTexturePeer();
689 } 682 }
690 683
691 if (!parsed_command_line_.HasSwitch( 684 if (!parsed_command_line_.HasSwitch(
692 switches::kDisableScreenOrientationLock)) { 685 switches::kDisableScreenOrientationLock)) {
693 TRACE_EVENT0("startup", 686 TRACE_EVENT0("startup",
694 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); 687 "BrowserMainLoop::Subsystem:ScreenOrientationProvider");
695 screen_orientation_delegate_.reset( 688 screen_orientation_delegate_.reset(
696 new ScreenOrientationDelegateAndroid()); 689 new ScreenOrientationDelegateAndroid());
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = 1619 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner =
1627 audio_thread_->task_runner(); 1620 audio_thread_->task_runner();
1628 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), 1621 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner),
1629 std::move(worker_task_runner), 1622 std::move(worker_task_runner),
1630 MediaInternals::GetInstance()); 1623 MediaInternals::GetInstance());
1631 } 1624 }
1632 CHECK(audio_manager_); 1625 CHECK(audio_manager_);
1633 } 1626 }
1634 1627
1635 } // namespace content 1628 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698