Chromium Code Reviews| Index: content/gpu/gpu_child_thread.cc |
| diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc |
| index 74864cbd35062f711a54fdf7adeb45f8e7d78f32..f09ab3e48c3f62c7817a19c513e14e95cb07e6fc 100644 |
| --- a/content/gpu/gpu_child_thread.cc |
| +++ b/content/gpu/gpu_child_thread.cc |
| @@ -19,6 +19,10 @@ |
| #include "ipc/ipc_sync_message_filter.h" |
| #include "ui/gl/gl_implementation.h" |
| +#if defined(USE_OZONE) |
| +#include "ui/ozone/gpu/gpu_platform_support.h" |
| +#endif |
| + |
| namespace content { |
| namespace { |
| @@ -100,6 +104,8 @@ bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) { |
| bool handled = true; |
| IPC_BEGIN_MESSAGE_MAP(GpuChildThread, msg) |
| IPC_MESSAGE_HANDLER(GpuMsg_Initialize, OnInitialize) |
| + IPC_MESSAGE_HANDLER(GpuMsg_InitializePlatformSupport, |
| + OnInitializePlatformSupport) |
| IPC_MESSAGE_HANDLER(GpuMsg_CollectGraphicsInfo, OnCollectGraphicsInfo) |
| IPC_MESSAGE_HANDLER(GpuMsg_GetVideoMemoryUsageStats, |
| OnGetVideoMemoryUsageStats) |
| @@ -154,6 +160,17 @@ void GpuChildThread::OnInitialize() { |
| ChildProcess::current()->GetShutDownEvent())); |
| } |
| +void GpuChildThread::OnInitializePlatformSupport(int32 host_route_id) { |
|
rjkroege
2014/06/16 21:38:49
MessageFilter might make this cleaner. Might let y
|
| +#if defined(USE_OZONE) |
| + ui::GpuPlatformSupport* platform_support = |
| + ui::GpuPlatformSupport::Initialize(); |
| + int gpu_route_id = gpu_channel_manager_->GenerateRouteID(); |
| + gpu_channel_manager_->AddRoute(gpu_route_id, platform_support); |
| + Send(new GpuHostMsg_PlatformSupportInitialized(host_route_id, gpu_route_id)); |
| + platform_support->OnChannelEstablished(this, host_route_id); |
| +#endif |
| +} |
| + |
| void GpuChildThread::StopWatchdog() { |
| if (watchdog_thread_.get()) { |
| watchdog_thread_->Stop(); |