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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 860073002: [ozone] Install ozone message filter in the gpu process in GpuChildThread() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | 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 86dac86c50747b8f1731989815c01881fcd8a008..b7846f43c8f43967ad6c362f2ebb11b6f5467121 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -44,13 +44,28 @@ bool GpuProcessLogMessageHandler(int severity,
return false;
}
+ChildThread::Options GetOptions() {
+ ChildThread::Options options;
+
+#if defined(USE_OZONE)
+ IPC::MessageFilter* message_filter = ui::OzonePlatform::GetInstance()
+ ->GetGpuPlatformSupport()
+ ->GetMessageFilter();
+ if (message_filter)
+ options.startup_filters.push_back(message_filter);
+#endif
+
+ return options;
+}
+
} // namespace
GpuChildThread::GpuChildThread(GpuWatchdogThread* watchdog_thread,
bool dead_on_arrival,
const gpu::GPUInfo& gpu_info,
const DeferredMessages& deferred_messages)
- : dead_on_arrival_(dead_on_arrival),
+ : ChildThread(GetOptions()),
+ dead_on_arrival_(dead_on_arrival),
gpu_info_(gpu_info),
deferred_messages_(deferred_messages),
in_browser_process_(false) {
@@ -170,13 +185,9 @@ void GpuChildThread::OnInitialize() {
channel()));
#if defined(USE_OZONE)
- ui::GpuPlatformSupport* gpu_platform_support =
- ui::OzonePlatform::GetInstance()->GetGpuPlatformSupport();
-
- gpu_platform_support->OnChannelEstablished(this);
- IPC::MessageFilter* message_filter = gpu_platform_support->GetMessageFilter();
- if (message_filter)
- channel()->AddFilter(message_filter);
+ ui::OzonePlatform::GetInstance()
+ ->GetGpuPlatformSupport()
+ ->OnChannelEstablished(this);
#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698