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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 2967963002: gpu: Reduce of BrowserGpuChannelHostFactory. (Closed)
Patch Set: . Created 3 years, 5 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/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index e0b8c932cb10df11c6f40ebb7e1869826a6031b0..086522f62d53a5e3d938a67202c54b4f1ad09a0e 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -51,8 +51,8 @@
#include "components/viz/service/display_compositor/compositor_overlay_candidate_validator_android.h"
#include "components/viz/service/display_compositor/server_shared_bitmap_manager.h"
#include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
+#include "content/browser/browser_main_loop.h"
#include "content/browser/compositor/surface_utils.h"
-#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
#include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
@@ -409,9 +409,11 @@ void Compositor::CreateContextProvider(
gpu::gles2::ContextCreationAttribHelper attributes,
gpu::SharedMemoryLimits shared_memory_limits,
ContextProviderCallback callback) {
- BrowserGpuChannelHostFactory::instance()->EstablishGpuChannel(
- base::Bind(&CreateContextProviderAfterGpuChannelEstablished, handle,
- attributes, shared_memory_limits, callback));
+ BrowserMainLoop::GetInstance()
+ ->gpu_channel_establish_factory()
+ ->EstablishGpuChannel(
+ base::Bind(&CreateContextProviderAfterGpuChannelEstablished, handle,
+ attributes, shared_memory_limits, callback));
}
// static
@@ -685,8 +687,10 @@ void CompositorImpl::HandlePendingLayerTreeFrameSinkRequest() {
this, &CompositorImpl::OnGpuChannelTimeout);
DCHECK(surface_handle_ != gpu::kNullSurfaceHandle);
- BrowserGpuChannelHostFactory::instance()->EstablishGpuChannel(base::Bind(
- &CompositorImpl::OnGpuChannelEstablished, weak_factory_.GetWeakPtr()));
+ BrowserMainLoop::GetInstance()
+ ->gpu_channel_establish_factory()
+ ->EstablishGpuChannel(base::Bind(&CompositorImpl::OnGpuChannelEstablished,
+ weak_factory_.GetWeakPtr()));
}
void CompositorImpl::OnGpuChannelTimeout() {

Powered by Google App Engine
This is Rietveld 408576698