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

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

Issue 2514923002: content: Use mus client-lib's gpu-service from renderers. (Closed)
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index fa2183bab1c09dd850da18ca0e94e119a202b52d..a1c7b60ce27ea663afe61e9927668fd4093fa1c0 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -71,6 +71,7 @@
#include "content/browser/frame_host/render_frame_message_filter.h"
#include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
#include "content/browser/gpu/compositor_util.h"
+#include "content/browser/gpu/gpu_client.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/gpu/shader_cache_factory.h"
@@ -1286,6 +1287,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
registry->AddInterface(base::Bind(&device::GamepadMonitor::Create));
+ registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest,
+ base::Unretained(this)));
+
registry->AddInterface(
base::Bind(&VideoCaptureHost::Create,
BrowserMainLoop::GetInstance()->media_stream_manager()));
@@ -1333,6 +1337,13 @@ void RenderProcessHostImpl::GetAssociatedInterface(
listener->OnAssociatedInterfaceRequest(name, request.PassHandle());
}
+void RenderProcessHostImpl::CreateMusGpuRequest(ui::mojom::GpuRequest request) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ if (!gpu_client_)
+ gpu_client_.reset(new GpuClient(GetID()));
+ gpu_client_->Add(std::move(request));
+}
+
void RenderProcessHostImpl::CreateStoragePartitionService(
mojo::InterfaceRequest<mojom::StoragePartitionService> request) {
// DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW!
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698