Commit f32a96c2 authored by Michael Spang's avatar Michael Spang Committed by Commit Bot

viz: Fix message pump type for test GPU main on Fuchsia

This is needed as we create platform surfaces on gpu main and therefore
must be able to respond to messages from the winsys on that thread.

Bug: 1047032

Change-Id: Ice667cb451ae17a9e10fbc157f0b88aa0bf14c65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2047494
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740097}
parent 3cfa0dec
...@@ -33,6 +33,7 @@ include_rules = [ ...@@ -33,6 +33,7 @@ include_rules = [
"+third_party/skia/include", "+third_party/skia/include",
"+ui/gl", "+ui/gl",
"+ui/latency", "+ui/latency",
"+ui/ozone/public",
] ]
specific_include_rules = { specific_include_rules = {
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
#include "gpu/vulkan/vulkan_implementation.h" #include "gpu/vulkan/vulkan_implementation.h"
#endif #endif
#if defined(USE_OZONE)
#include "ui/ozone/public/ozone_platform.h"
#endif
namespace viz { namespace viz {
namespace { namespace {
...@@ -142,7 +146,14 @@ void TestGpuServiceHolder::DoNotResetOnTestExit() { ...@@ -142,7 +146,14 @@ void TestGpuServiceHolder::DoNotResetOnTestExit() {
TestGpuServiceHolder::TestGpuServiceHolder( TestGpuServiceHolder::TestGpuServiceHolder(
const gpu::GpuPreferences& gpu_preferences) const gpu::GpuPreferences& gpu_preferences)
: gpu_thread_("GPUMainThread"), io_thread_("GPUIOThread") { : gpu_thread_("GPUMainThread"), io_thread_("GPUIOThread") {
CHECK(gpu_thread_.Start()); base::Thread::Options gpu_main_options;
#if defined(USE_OZONE)
gpu_main_options.message_pump_type = ui::OzonePlatform::GetInstance()
->GetPlatformProperties()
.message_pump_type_for_gpu;
#endif
CHECK(gpu_thread_.StartWithOptions(gpu_main_options));
CHECK(io_thread_.Start()); CHECK(io_thread_.Start());
base::WaitableEvent completion; base::WaitableEvent completion;
......
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