| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ozone/platform/dri/ozone_platform_dri.h" | 5 #include "ui/ozone/platform/dri/ozone_platform_dri.h" |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" | 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" |
| 9 #include "ui/events/ozone/device/device_manager.h" | 9 #include "ui/events/ozone/device/device_manager.h" |
| 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" | 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" |
| 11 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 11 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
| 12 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
| 13 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" |
| 12 #include "ui/ozone/platform/dri/display_manager.h" | 14 #include "ui/ozone/platform/dri/display_manager.h" |
| 13 #include "ui/ozone/platform/dri/dri_buffer.h" | 15 #include "ui/ozone/platform/dri/dri_buffer.h" |
| 14 #include "ui/ozone/platform/dri/dri_cursor.h" | 16 #include "ui/ozone/platform/dri/dri_cursor.h" |
| 15 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" | 17 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" |
| 16 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" | 18 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" |
| 17 #include "ui/ozone/platform/dri/dri_surface_factory.h" | 19 #include "ui/ozone/platform/dri/dri_surface_factory.h" |
| 18 #include "ui/ozone/platform/dri/dri_window.h" | 20 #include "ui/ozone/platform/dri/dri_window.h" |
| 19 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h" | 21 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h" |
| 20 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h" | 22 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h" |
| 21 #include "ui/ozone/platform/dri/dri_window_manager.h" | 23 #include "ui/ozone/platform/dri/dri_window_manager.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 surface_factory_ozone_.reset( | 90 surface_factory_ozone_.reset( |
| 89 new DriSurfaceFactory(dri_.get(), &window_delegate_manager_)); | 91 new DriSurfaceFactory(dri_.get(), &window_delegate_manager_)); |
| 90 gpu_platform_support_.reset(new DriGpuPlatformSupport( | 92 gpu_platform_support_.reset(new DriGpuPlatformSupport( |
| 91 dri_.get(), &window_delegate_manager_, screen_manager_.get(), | 93 dri_.get(), &window_delegate_manager_, screen_manager_.get(), |
| 92 scoped_ptr<NativeDisplayDelegateDri>(new NativeDisplayDelegateDri( | 94 scoped_ptr<NativeDisplayDelegateDri>(new NativeDisplayDelegateDri( |
| 93 dri_.get(), screen_manager_.get(), NULL)))); | 95 dri_.get(), screen_manager_.get(), NULL)))); |
| 94 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); | 96 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); |
| 95 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); | 97 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); |
| 96 window_manager_.reset( | 98 window_manager_.reset( |
| 97 new DriWindowManager(gpu_platform_support_host_.get())); | 99 new DriWindowManager(gpu_platform_support_host_.get())); |
| 98 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(), | 100 KeyboardLayoutEngineManager::Create( |
| 99 device_manager_.get())); | 101 make_scoped_ptr(new StubKeyboardLayoutEngine())); |
| 102 event_factory_ozone_.reset(new EventFactoryEvdev( |
| 103 window_manager_->cursor(), device_manager_.get(), |
| 104 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); |
| 100 if (surface_factory_ozone_->InitializeHardware() != | 105 if (surface_factory_ozone_->InitializeHardware() != |
| 101 DriSurfaceFactory::INITIALIZED) | 106 DriSurfaceFactory::INITIALIZED) |
| 102 LOG(FATAL) << "Failed to initialize display hardware."; | 107 LOG(FATAL) << "Failed to initialize display hardware."; |
| 103 | 108 |
| 104 if (!ui_thread_gpu_.Initialize()) | 109 if (!ui_thread_gpu_.Initialize()) |
| 105 LOG(FATAL) << "Failed to initialize dummy channel."; | 110 LOG(FATAL) << "Failed to initialize dummy channel."; |
| 106 } | 111 } |
| 107 | 112 |
| 108 void InitializeGPU() override {} | 113 void InitializeGPU() override {} |
| 109 | 114 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 125 | 130 |
| 126 DriWindowDelegateManager window_delegate_manager_; | 131 DriWindowDelegateManager window_delegate_manager_; |
| 127 | 132 |
| 128 UiThreadGpu ui_thread_gpu_; | 133 UiThreadGpu ui_thread_gpu_; |
| 129 | 134 |
| 130 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 135 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
| 131 }; | 136 }; |
| 132 | 137 |
| 133 } // namespace | 138 } // namespace |
| 134 | 139 |
| 135 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } | 140 OzonePlatform* CreateOzonePlatformDri() { |
| 141 return new OzonePlatformDri; |
| 142 } |
| 136 | 143 |
| 137 } // namespace ui | 144 } // namespace ui |
| OLD | NEW |