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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 338193003: ozone: gpu: Add plumbing for platform-specific gpu messaging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/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();

Powered by Google App Engine
This is Rietveld 408576698