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

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: remove routing ids 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..7ac132edfe9ace8f36308d258f3a6cafe0332eaf 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 {
@@ -52,6 +56,9 @@ GpuChildThread::GpuChildThread(GpuWatchdogThread* watchdog_thread,
#if defined(OS_WIN)
target_services_ = NULL;
#endif
+#if defined(USE_OZONE)
+ ui::GpuPlatformSupport::Initialize();
+#endif
g_thread_safe_sender.Get() = thread_safe_sender();
}
@@ -113,6 +120,11 @@ bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) {
if (handled)
return true;
+#if defined(USE_OZONE)
+ if (ui::GpuPlatformSupport::GetInstance()->OnMessageReceived(msg))
+ return true;
+#endif
+
return gpu_channel_manager_.get() &&
gpu_channel_manager_->OnMessageReceived(msg);
}
@@ -152,6 +164,10 @@ void GpuChildThread::OnInitialize() {
watchdog_thread_.get(),
ChildProcess::current()->io_message_loop_proxy(),
ChildProcess::current()->GetShutDownEvent()));
+
+#if defined(USE_OZONE)
+ ui::GpuPlatformSupport::GetInstance()->OnChannelEstablished(this);
+#endif
}
void GpuChildThread::StopWatchdog() {

Powered by Google App Engine
This is Rietveld 408576698