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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/icu_util.h" | 8 #include "base/i18n/icu_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "ui/aura/window.h" | 22 #include "ui/aura/window.h" |
23 #include "ui/base/hit_test.h" | 23 #include "ui/base/hit_test.h" |
24 #include "ui/compositor/compositor.h" | 24 #include "ui/compositor/compositor.h" |
25 #include "ui/compositor/compositor_observer.h" | 25 #include "ui/compositor/compositor_observer.h" |
26 #include "ui/compositor/debug_utils.h" | 26 #include "ui/compositor/debug_utils.h" |
27 #include "ui/compositor/layer.h" | 27 #include "ui/compositor/layer.h" |
28 #include "ui/compositor/test/context_factories_for_test.h" | 28 #include "ui/compositor/test/context_factories_for_test.h" |
29 #include "ui/gfx/canvas.h" | 29 #include "ui/gfx/canvas.h" |
30 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
31 #include "ui/gfx/skia_util.h" | 31 #include "ui/gfx/skia_util.h" |
| 32 #include "ui/gl/gl_surface.h" |
| 33 |
32 #ifndef GL_GLEXT_PROTOTYPES | 34 #ifndef GL_GLEXT_PROTOTYPES |
33 #define GL_GLEXT_PROTOTYPES 1 | 35 #define GL_GLEXT_PROTOTYPES 1 |
34 #endif | 36 #endif |
35 #include "third_party/khronos/GLES2/gl2ext.h" | 37 #include "third_party/khronos/GLES2/gl2ext.h" |
36 | 38 |
37 #if defined(USE_X11) | 39 #if defined(USE_X11) |
38 #include "base/message_loop/message_pump_x11.h" | 40 #include "base/message_loop/message_pump_x11.h" |
39 #endif | 41 #endif |
40 | 42 |
41 using base::TimeTicks; | 43 using base::TimeTicks; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 DISALLOW_COPY_AND_ASSIGN(SoftwareScrollBench); | 286 DISALLOW_COPY_AND_ASSIGN(SoftwareScrollBench); |
285 }; | 287 }; |
286 | 288 |
287 } // namespace | 289 } // namespace |
288 | 290 |
289 int main(int argc, char** argv) { | 291 int main(int argc, char** argv) { |
290 CommandLine::Init(argc, argv); | 292 CommandLine::Init(argc, argv); |
291 | 293 |
292 base::AtExitManager exit_manager; | 294 base::AtExitManager exit_manager; |
293 | 295 |
| 296 gfx::GLSurface::InitializeOneOff(); |
| 297 |
294 // The ContextFactory must exist before any Compositors are created. | 298 // The ContextFactory must exist before any Compositors are created. |
295 bool allow_test_contexts = false; | 299 bool allow_test_contexts = false; |
296 ui::InitializeContextFactoryForTests(allow_test_contexts); | 300 ui::InitializeContextFactoryForTests(allow_test_contexts); |
297 | 301 |
298 base::i18n::InitializeICU(); | 302 base::i18n::InitializeICU(); |
299 | 303 |
300 base::MessageLoopForUI message_loop; | 304 base::MessageLoopForUI message_loop; |
301 aura::Env::CreateInstance(); | 305 aura::Env::CreateInstance(); |
302 scoped_ptr<aura::TestScreen> test_screen( | 306 scoped_ptr<aura::TestScreen> test_screen( |
303 aura::TestScreen::CreateFullscreen()); | 307 aura::TestScreen::CreateFullscreen()); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 ui::PrintLayerHierarchy(root_window->window()->layer(), gfx::Point(100, 100)); | 356 ui::PrintLayerHierarchy(root_window->window()->layer(), gfx::Point(100, 100)); |
353 #endif | 357 #endif |
354 | 358 |
355 root_window->host()->Show(); | 359 root_window->host()->Show(); |
356 base::MessageLoopForUI::current()->Run(); | 360 base::MessageLoopForUI::current()->Run(); |
357 focus_client.reset(); | 361 focus_client.reset(); |
358 root_window.reset(); | 362 root_window.reset(); |
359 | 363 |
360 return 0; | 364 return 0; |
361 } | 365 } |
OLD | NEW |