Commit 1167989f authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

Fix VizProcessTransportFactory to use correct message loop type.

After crrev.com/677743 in-process Viz thread was started with
TYPE_DEFAULT instead of TYPE_IO that is needed to be able to use FIDL
APIs on Fuchsia. Updated it to use message type returned from
OzonePlatform::GetMessageLoopTypeForGpu().

Bug: 985084
Change-Id: I7c9cbcc0ec3d1f751f18937660c8891ed14df49b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1706621Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678470}
parent c9e587f8
......@@ -16,5 +16,8 @@ specific_include_rules = {
],
"reflector_impl_unittest\.cc": [
"+ui/ozone/public",
],
"viz_process_transport_factory\.cc": [
"+ui/ozone/public",
]
}
......@@ -44,6 +44,10 @@
#include "ui/gfx/win/rendering_window_manager.h"
#endif
#if defined(USE_OZONE)
#include "ui/ozone/public/ozone_platform.h"
#endif
namespace content {
namespace {
......@@ -190,8 +194,13 @@ void VizProcessTransportFactory::ConnectHostFrameSinkManager() {
// GPU process access is disabled. Start a new thread to run the display
// compositor in-process and connect HostFrameSinkManager to it.
viz_compositor_thread_ = std::make_unique<viz::VizCompositorThreadRunner>(
base::MessageLoop::TYPE_DEFAULT);
base::MessageLoop::Type message_loop_type = base::MessageLoop::TYPE_DEFAULT;
#if defined(USE_OZONE)
message_loop_type =
ui::OzonePlatform::GetInstance()->GetMessageLoopTypeForGpu();
#endif
viz_compositor_thread_ =
std::make_unique<viz::VizCompositorThreadRunner>(message_loop_type);
viz::mojom::FrameSinkManagerParamsPtr params =
viz::mojom::FrameSinkManagerParams::New();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment