| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| 11 #include "ui/display/types/display_snapshot.h" | 11 #include "ui/display/types/display_snapshot.h" |
| 12 #include "ui/display/types/native_display_delegate.h" | 12 #include "ui/display/types/native_display_delegate.h" |
| 13 #include "ui/display/types/native_display_observer.h" | 13 #include "ui/display/types/native_display_observer.h" |
| 14 #include "ui/events/event.h" | 14 #include "ui/events/event.h" |
| 15 #include "ui/events/keycodes/dom/dom_code.h" | 15 #include "ui/events/keycodes/dom/dom_code.h" |
| 16 #include "ui/events/ozone/layout/keyboard_layout_engine.h" | 16 #include "ui/events/ozone/layout/keyboard_layout_engine.h" |
| 17 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" | 17 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
| 18 #include "ui/gfx/geometry/rect.h" | 18 #include "ui/gfx/geometry/rect.h" |
| 19 #include "ui/gfx/geometry/size.h" | 19 #include "ui/gfx/geometry/size.h" |
| 20 #include "ui/gl/gl_surface.h" | 20 #include "ui/gl/gl_surface.h" |
| 21 #include "ui/ozone/demo/gl_renderer.h" | 21 #include "ui/ozone/demo/gl_renderer.h" |
| 22 #include "ui/ozone/demo/software_renderer.h" | 22 #include "ui/ozone/demo/software_renderer.h" |
| 23 #include "ui/ozone/demo/surfaceless_gl_renderer.h" | 23 #include "ui/ozone/demo/surfaceless_gl_renderer.h" |
| 24 #include "ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h" | 24 #include "ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h" |
| 25 #include "ui/ozone/public/ozone_gpu_test_helper.h" | 25 #include "ui/ozone/public/ozone_gpu_test_helper.h" |
| 26 #include "ui/ozone/public/ozone_platform.h" | 26 #include "ui/ozone/public/ozone_platform.h" |
| 27 #include "ui/ozone/public/ozone_switches.h" | 27 #include "ui/ozone/public/ozone_switches.h" |
| 28 #include "ui/platform_window/platform_window.h" | 28 #include "ui/platform_window/platform_window.h" |
| 29 #include "ui/platform_window/platform_window_delegate.h" | 29 #include "ui/platform_window/platform_window_delegate.h" |
| 30 | 30 |
| 31 const int kTestWindowWidth = 800; | 31 const int kTestWindowWidth = 800; |
| 32 const int kTestWindowHeight = 600; | 32 const int kTestWindowHeight = 600; |
| 33 | 33 |
| 34 const char kDisableGpu[] = "disable-gpu"; | 34 const char kDisableGpu[] = "disable-gpu"; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 52 scoped_ptr<ui::Renderer> CreateRenderer(gfx::AcceleratedWidget widget, | 52 scoped_ptr<ui::Renderer> CreateRenderer(gfx::AcceleratedWidget widget, |
| 53 const gfx::Size& size); | 53 const gfx::Size& size); |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 RendererType type_ = SOFTWARE; | 56 RendererType type_ = SOFTWARE; |
| 57 | 57 |
| 58 // Helper for applications that do GL on main thread. | 58 // Helper for applications that do GL on main thread. |
| 59 ui::OzoneGpuTestHelper gpu_helper_; | 59 ui::OzoneGpuTestHelper gpu_helper_; |
| 60 | 60 |
| 61 // Used by the surfaceless renderers to allocate buffers. | 61 // Used by the surfaceless renderers to allocate buffers. |
| 62 ui::GpuMemoryBufferFactoryOzoneNativeBuffer buffer_factory_; | 62 ui::GpuMemoryBufferFactoryOzoneNativePixmap buffer_factory_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(RendererFactory); | 64 DISALLOW_COPY_AND_ASSIGN(RendererFactory); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 class WindowManager : public ui::NativeDisplayObserver { | 67 class WindowManager : public ui::NativeDisplayObserver { |
| 68 public: | 68 public: |
| 69 WindowManager(const base::Closure& quit_closure); | 69 WindowManager(const base::Closure& quit_closure); |
| 70 ~WindowManager() override; | 70 ~WindowManager() override; |
| 71 | 71 |
| 72 void Quit(); | 72 void Quit(); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 ->SetCurrentLayoutByName("us"); | 324 ->SetCurrentLayoutByName("us"); |
| 325 | 325 |
| 326 base::RunLoop run_loop; | 326 base::RunLoop run_loop; |
| 327 | 327 |
| 328 WindowManager window_manager(run_loop.QuitClosure()); | 328 WindowManager window_manager(run_loop.QuitClosure()); |
| 329 | 329 |
| 330 run_loop.Run(); | 330 run_loop.Run(); |
| 331 | 331 |
| 332 return 0; | 332 return 0; |
| 333 } | 333 } |
| OLD | NEW |