Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/compositor/test/test_suite.h" | 5 #include "ui/compositor/test/test_suite.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "ui/compositor/compositor.h" | 10 #include "ui/compositor/compositor.h" |
| 11 #include "ui/compositor/compositor_switches.h" | 11 #include "ui/compositor/compositor_switches.h" |
| 12 #include "ui/compositor/layer.h" | 12 #include "ui/compositor/layer.h" |
| 13 #include "ui/gfx/gfx_paths.h" | 13 #include "ui/gfx/gfx_paths.h" |
| 14 #include "ui/gl/test/gl_surface_test_support.h" | 14 #include "ui/gl/test/gl_surface_test_support.h" |
| 15 | 15 |
| 16 #if defined(USE_OZONE) | |
| 17 #include "ui/ozone/public/ozone_platform.h" | |
| 18 #endif | |
| 19 | |
| 16 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
| 17 #include "ui/display/win/dpi.h" | 21 #include "ui/display/win/dpi.h" |
| 18 #endif | 22 #endif |
| 19 | 23 |
| 20 namespace ui { | 24 namespace ui { |
| 21 namespace test { | 25 namespace test { |
| 22 | 26 |
| 23 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) | 27 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) |
| 24 : TestSuite(argc, argv) {} | 28 : TestSuite(argc, argv) {} |
| 25 | 29 |
| 26 CompositorTestSuite::~CompositorTestSuite() {} | 30 CompositorTestSuite::~CompositorTestSuite() {} |
| 27 | 31 |
| 28 void CompositorTestSuite::Initialize() { | 32 void CompositorTestSuite::Initialize() { |
| 29 base::TestSuite::Initialize(); | 33 base::TestSuite::Initialize(); |
| 30 gl::GLSurfaceTestSupport::InitializeOneOff(); | 34 gl::GLSurfaceTestSupport::InitializeOneOff(); |
| 31 | 35 |
| 32 gfx::RegisterPathProvider(); | 36 gfx::RegisterPathProvider(); |
| 33 | 37 |
| 38 #if defined(USE_OZONE) | |
|
danakj
2017/03/06 20:56:16
nit: group with GLSurface init
kylechar
2017/03/06 21:50:40
Done.
| |
| 39 ui::OzonePlatform::InitializeForUI(); | |
| 40 #endif | |
| 41 | |
| 34 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
| 35 display::win::SetDefaultDeviceScaleFactor(1.0f); | 43 display::win::SetDefaultDeviceScaleFactor(1.0f); |
| 36 #endif | 44 #endif |
| 37 | 45 |
| 38 message_loop_.reset(new base::MessageLoopForUI); | 46 message_loop_.reset(new base::MessageLoopForUI); |
| 39 } | 47 } |
| 40 | 48 |
| 41 void CompositorTestSuite::Shutdown() { | 49 void CompositorTestSuite::Shutdown() { |
| 42 message_loop_.reset(); | 50 message_loop_.reset(); |
| 43 | 51 |
| 44 base::TestSuite::Shutdown(); | 52 base::TestSuite::Shutdown(); |
| 45 } | 53 } |
| 46 | 54 |
| 47 } // namespace test | 55 } // namespace test |
| 48 } // namespace ui | 56 } // namespace ui |
| OLD | NEW |