Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: ui/compositor/test/test_suite.cc

Issue 659883002: Enable hidpi on Linux, refactor a bit on Windows to share Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "ui/compositor/compositor.h" 9 #include "ui/compositor/compositor.h"
10 #include "ui/compositor/compositor_switches.h" 10 #include "ui/compositor/compositor_switches.h"
11 #include "ui/gfx/dpi.h"
11 #include "ui/gfx/gfx_paths.h" 12 #include "ui/gfx/gfx_paths.h"
12 #include "ui/gl/gl_surface.h" 13 #include "ui/gl/gl_surface.h"
13 14
14 #if defined(OS_WIN)
15 #include "ui/gfx/win/dpi.h"
16 #endif
17 15
18 namespace ui { 16 namespace ui {
19 namespace test { 17 namespace test {
20 18
21 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) 19 CompositorTestSuite::CompositorTestSuite(int argc, char** argv)
22 : TestSuite(argc, argv) {} 20 : TestSuite(argc, argv) {}
23 21
24 CompositorTestSuite::~CompositorTestSuite() {} 22 CompositorTestSuite::~CompositorTestSuite() {}
25 23
26 void CompositorTestSuite::Initialize() { 24 void CompositorTestSuite::Initialize() {
27 base::TestSuite::Initialize(); 25 base::TestSuite::Initialize();
28 gfx::GLSurface::InitializeOneOffForTests(); 26 gfx::GLSurface::InitializeOneOffForTests();
29 27
30 gfx::RegisterPathProvider(); 28 gfx::RegisterPathProvider();
31 29
32 #if defined(OS_WIN) 30 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
33 gfx::InitDeviceScaleFactor(1.0f); 31 gfx::InitDeviceScaleFactor(1.0f);
34 #endif 32 #endif
35 33
36 message_loop_.reset(new base::MessageLoopForUI); 34 message_loop_.reset(new base::MessageLoopForUI);
37 } 35 }
38 36
39 void CompositorTestSuite::Shutdown() { 37 void CompositorTestSuite::Shutdown() {
40 message_loop_.reset(); 38 message_loop_.reset();
41 39
42 base::TestSuite::Shutdown(); 40 base::TestSuite::Shutdown();
43 } 41 }
44 42
45 } // namespace test 43 } // namespace test
46 } // namespace ui 44 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/win/hwnd_subclass.cc ('k') | ui/events/win/events_win.cc » ('j') | ui/gfx/dpi.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698