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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/i18n/icu_util.h" | 9 #include "base/i18n/icu_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "ui/aura/window.h" | 22 #include "ui/aura/window.h" |
23 #include "ui/aura/window_delegate.h" | 23 #include "ui/aura/window_delegate.h" |
24 #include "ui/aura/window_tree_host.h" | 24 #include "ui/aura/window_tree_host.h" |
25 #include "ui/base/hit_test.h" | 25 #include "ui/base/hit_test.h" |
26 #include "ui/compositor/paint_recorder.h" | 26 #include "ui/compositor/paint_recorder.h" |
27 #include "ui/compositor/test/in_process_context_factory.h" | 27 #include "ui/compositor/test/in_process_context_factory.h" |
28 #include "ui/events/event.h" | 28 #include "ui/events/event.h" |
29 #include "ui/gfx/canvas.h" | 29 #include "ui/gfx/canvas.h" |
30 #include "ui/gfx/geometry/rect.h" | 30 #include "ui/gfx/geometry/rect.h" |
31 #include "ui/gfx/skia_util.h" | 31 #include "ui/gfx/skia_util.h" |
32 #include "ui/gl/gl_surface.h" | 32 #include "ui/gl/init/gl_factory.h" |
33 | 33 |
34 #if defined(USE_X11) | 34 #if defined(USE_X11) |
35 #include "ui/gfx/x/x11_connection.h" // nogncheck | 35 #include "ui/gfx/x/x11_connection.h" // nogncheck |
36 #endif | 36 #endif |
37 | 37 |
38 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
39 #include "ui/display/win/dpi.h" | 39 #include "ui/display/win/dpi.h" |
40 #endif | 40 #endif |
41 | 41 |
42 namespace { | 42 namespace { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 DISALLOW_COPY_AND_ASSIGN(DemoWindowTreeClient); | 123 DISALLOW_COPY_AND_ASSIGN(DemoWindowTreeClient); |
124 }; | 124 }; |
125 | 125 |
126 int DemoMain() { | 126 int DemoMain() { |
127 #if defined(USE_X11) | 127 #if defined(USE_X11) |
128 // This demo uses InProcessContextFactory which uses X on a separate Gpu | 128 // This demo uses InProcessContextFactory which uses X on a separate Gpu |
129 // thread. | 129 // thread. |
130 gfx::InitializeThreadedX11(); | 130 gfx::InitializeThreadedX11(); |
131 #endif | 131 #endif |
132 | 132 |
133 gfx::GLSurface::InitializeOneOff(); | 133 gl::init::InitializeGLOneOff(); |
134 | 134 |
135 #if defined(OS_WIN) | 135 #if defined(OS_WIN) |
136 display::win::SetDefaultDeviceScaleFactor(1.0f); | 136 display::win::SetDefaultDeviceScaleFactor(1.0f); |
137 #endif | 137 #endif |
138 | 138 |
139 // The ContextFactory must exist before any Compositors are created. | 139 // The ContextFactory must exist before any Compositors are created. |
140 bool context_factory_for_test = false; | 140 bool context_factory_for_test = false; |
141 std::unique_ptr<ui::InProcessContextFactory> context_factory( | 141 std::unique_ptr<ui::InProcessContextFactory> context_factory( |
142 new ui::InProcessContextFactory(context_factory_for_test, nullptr)); | 142 new ui::InProcessContextFactory(context_factory_for_test, nullptr)); |
143 context_factory->set_use_test_surface(false); | 143 context_factory->set_use_test_surface(false); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 int main(int argc, char** argv) { | 199 int main(int argc, char** argv) { |
200 base::CommandLine::Init(argc, argv); | 200 base::CommandLine::Init(argc, argv); |
201 | 201 |
202 // The exit manager is in charge of calling the dtors of singleton objects. | 202 // The exit manager is in charge of calling the dtors of singleton objects. |
203 base::AtExitManager exit_manager; | 203 base::AtExitManager exit_manager; |
204 | 204 |
205 base::i18n::InitializeICU(); | 205 base::i18n::InitializeICU(); |
206 | 206 |
207 return DemoMain(); | 207 return DemoMain(); |
208 } | 208 } |
OLD | NEW |