From 12a22c99588dd2118a0cf375f8c9b501887f8090 Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Thu, 11 Sep 2014 17:55:59 -0500 Subject: [PATCH] Bug 1066242 - Use a 'ui' chromium message loop/pump for the Windows compositor thread so that it can process native windowing events. r=Bas --- gfx/layers/ipc/CompositorParent.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 6455df86902a..fa969feaf5dc 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -149,6 +149,12 @@ CompositorThreadHolder::CreateCompositorThread() * Compositor hangs seen in the wild, but is short enough to not miss getting * native hang stacks. */ options.permanent_hang_timeout = 2048; // milliseconds +#if defined(_WIN32) + /* With d3d9 the compositor thread creates native ui, see DeviceManagerD3D9. As + * such the thread is a gui thread, and must process a windows message queue or + * risk deadlocks. Chromium message loop TYPE_UI does exactly what we need. */ + options.message_loop_type = MessageLoop::TYPE_UI; +#endif if (!compositorThread->StartWithOptions(options)) { delete compositorThread;