blob: b2d97ff82a82ec14696c03c94bf8184a2a9f5b6c [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/message_loop/message_loop.h"
#if defined(USE_OZONE)
#include "ui/ozone/public/ozone_platform.h"
namespace gpu {
namespace test {
// Returns the MessageLoop type needed for GPU tests. The Ozone platform may not
// work with TYPE_DEFAULT and this needs to be checked at runtime.
inline base::MessageLoop::Type GetMessageLoopTypeForGpu() {
#if defined(USE_OZONE)
return ui::OzonePlatform::EnsureInstance()->GetMessageLoopTypeForGpu();
return base::MessageLoop::TYPE_DEFAULT;
} // namespace test
} // namespace gpu