| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef GPU_TEST_MESSAGE_LOOP_TYPE_H_ | |
| 6 #define GPU_TEST_MESSAGE_LOOP_TYPE_H_ | |
| 7 | |
| 8 #include "base/message_loop/message_loop.h" | |
| 9 | |
| 10 #if defined(USE_OZONE) | |
| 11 #include "ui/ozone/public/ozone_platform.h" | |
| 12 #endif | |
| 13 | |
| 14 namespace gpu { | |
| 15 namespace test { | |
| 16 | |
| 17 // Returns the MessageLoop type needed for GPU tests. The Ozone platform may not | |
| 18 // work with TYPE_DEFAULT and this needs to be checked at runtime. | |
| 19 inline base::MessageLoop::Type GetMessageLoopTypeForGpu() { | |
| 20 #if defined(USE_OZONE) | |
| 21 return ui::OzonePlatform::EnsureInstance()->GetMessageLoopTypeForGpu(); | |
| 22 #else | |
| 23 return base::MessageLoop::TYPE_DEFAULT; | |
| 24 #endif | |
| 25 } | |
| 26 | |
| 27 } // namespace test | |
| 28 } // namespace gpu | |
| 29 | |
| 30 #endif // GPU_TEST_MESSAGE_LOOP_TYPE_H_ | |
| OLD | NEW |