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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 2798363003: Revert "gpu: Use mojom API for creating gpu channel." (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « content/gpu/gpu_child_thread.h ('k') | services/ui/gpu/interfaces/gpu_service.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.cc
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index da3646ab674dc4a60753af39cbad055cd753c567..a96ab43794e78597e1d4c32215f4badf9e7ec304 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -269,6 +269,7 @@ bool GpuChildThread::OnMessageReceived(const IPC::Message& msg) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(GpuChildThread, msg)
+ IPC_MESSAGE_HANDLER(GpuMsg_EstablishChannel, OnEstablishChannel)
IPC_MESSAGE_HANDLER(GpuMsg_CloseChannel, OnCloseChannel)
IPC_MESSAGE_HANDLER(GpuMsg_DestroyGpuMemoryBuffer, OnDestroyGpuMemoryBuffer)
IPC_MESSAGE_HANDLER(GpuMsg_LoadedShader, OnLoadedShader)
@@ -455,6 +456,17 @@ void GpuChildThread::OnGpuSwitched() {
ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched();
}
+void GpuChildThread::OnEstablishChannel(const EstablishChannelParams& params) {
+ if (!gpu_channel_manager())
+ return;
+
+ IPC::ChannelHandle channel_handle = gpu_channel_manager()->EstablishChannel(
+ params.client_id, params.client_tracing_id, params.preempts,
+ params.allow_view_command_buffers, params.allow_real_time_streams);
+ gpu_service_->media_gpu_channel_manager()->AddChannel(params.client_id);
+ Send(new GpuHostMsg_ChannelEstablished(channel_handle));
+}
+
void GpuChildThread::OnCloseChannel(int32_t client_id) {
if (gpu_channel_manager())
gpu_channel_manager()->RemoveChannel(client_id);
« no previous file with comments | « content/gpu/gpu_child_thread.h ('k') | services/ui/gpu/interfaces/gpu_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698