| 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.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/strings/string_split.h" | 11 #include "base/strings/string_split.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "third_party/khronos/GLES2/gl2.h" | 13 #include "third_party/khronos/GLES2/gl2.h" |
| 14 #include "third_party/skia/include/core/SkXfermode.h" | 14 #include "third_party/skia/include/core/SkXfermode.h" |
| 15 #include "ui/aura/client/default_capture_client.h" | 15 #include "ui/aura/client/default_capture_client.h" |
| 16 #include "ui/aura/env.h" | 16 #include "ui/aura/env.h" |
| 17 #include "ui/aura/focus_manager.h" | 17 #include "ui/aura/focus_manager.h" |
| 18 #include "ui/aura/root_window.h" | 18 #include "ui/aura/root_window.h" |
| 19 #include "ui/aura/test/test_screen.h" | 19 #include "ui/aura/test/test_screen.h" |
| 20 #include "ui/aura/window.h" | 20 #include "ui/aura/window.h" |
| 21 #include "ui/base/hit_test.h" | 21 #include "ui/base/hit_test.h" |
| 22 #include "ui/base/resource/resource_bundle.h" | 22 #include "ui/base/resource/resource_bundle.h" |
| 23 #include "ui/base/ui_base_paths.h" | 23 #include "ui/base/ui_base_paths.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/compositor_test_support.h" |
| 28 #include "ui/gfx/canvas.h" | 29 #include "ui/gfx/canvas.h" |
| 29 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
| 30 #include "ui/gfx/skia_util.h" | 31 #include "ui/gfx/skia_util.h" |
| 31 #ifndef GL_GLEXT_PROTOTYPES | 32 #ifndef GL_GLEXT_PROTOTYPES |
| 32 #define GL_GLEXT_PROTOTYPES 1 | 33 #define GL_GLEXT_PROTOTYPES 1 |
| 33 #endif | 34 #endif |
| 34 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 35 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 35 #include "third_party/khronos/GLES2/gl2ext.h" | 36 #include "third_party/khronos/GLES2/gl2ext.h" |
| 36 | 37 |
| 37 #if defined(USE_X11) | 38 #if defined(USE_X11) |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 int main(int argc, char** argv) { | 295 int main(int argc, char** argv) { |
| 295 CommandLine::Init(argc, argv); | 296 CommandLine::Init(argc, argv); |
| 296 | 297 |
| 297 base::AtExitManager exit_manager; | 298 base::AtExitManager exit_manager; |
| 298 | 299 |
| 299 ui::RegisterPathProvider(); | 300 ui::RegisterPathProvider(); |
| 300 icu_util::Initialize(); | 301 icu_util::Initialize(); |
| 301 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); | 302 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); |
| 302 | 303 |
| 303 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); | 304 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); |
| 305 ui::CompositorTestSupport::Initialize(); |
| 304 aura::Env::GetInstance(); | 306 aura::Env::GetInstance(); |
| 305 scoped_ptr<aura::TestScreen> test_screen( | 307 scoped_ptr<aura::TestScreen> test_screen( |
| 306 aura::TestScreen::CreateFullscreen()); | 308 aura::TestScreen::CreateFullscreen()); |
| 307 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); | 309 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); |
| 308 scoped_ptr<aura::RootWindow> root_window( | 310 scoped_ptr<aura::RootWindow> root_window( |
| 309 test_screen->CreateRootWindowForPrimaryDisplay()); | 311 test_screen->CreateRootWindowForPrimaryDisplay()); |
| 310 aura::client::SetCaptureClient( | 312 aura::client::SetCaptureClient( |
| 311 root_window.get(), | 313 root_window.get(), |
| 312 new aura::client::DefaultCaptureClient(root_window.get())); | 314 new aura::client::DefaultCaptureClient(root_window.get())); |
| 313 | 315 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 354 |
| 353 #ifndef NDEBUG | 355 #ifndef NDEBUG |
| 354 ui::PrintLayerHierarchy(root_window->layer(), gfx::Point(100, 100)); | 356 ui::PrintLayerHierarchy(root_window->layer(), gfx::Point(100, 100)); |
| 355 #endif | 357 #endif |
| 356 | 358 |
| 357 root_window->ShowRootWindow(); | 359 root_window->ShowRootWindow(); |
| 358 base::MessageLoopForUI::current()->Run(); | 360 base::MessageLoopForUI::current()->Run(); |
| 359 focus_client.reset(); | 361 focus_client.reset(); |
| 360 root_window.reset(); | 362 root_window.reset(); |
| 361 | 363 |
| 364 ui::CompositorTestSupport::Terminate(); |
| 365 |
| 362 return 0; | 366 return 0; |
| 363 } | 367 } |
| OLD | NEW |