summaryrefslogtreecommitdiff
path: root/chromium/content/gpu/gpu_child_thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/gpu/gpu_child_thread.cc')
-rw-r--r--chromium/content/gpu/gpu_child_thread.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chromium/content/gpu/gpu_child_thread.cc b/chromium/content/gpu/gpu_child_thread.cc
index de49633c845..6da716b9ec9 100644
--- a/chromium/content/gpu/gpu_child_thread.cc
+++ b/chromium/content/gpu/gpu_child_thread.cc
@@ -276,6 +276,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)
@@ -466,6 +467,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);