| 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" | 12 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
| 13 #include "ui/ozone/platform/dri/display_manager.h" | 13 #include "ui/ozone/platform/dri/display_manager.h" |
| 14 #include "ui/ozone/platform/dri/dri_buffer.h" | 14 #include "ui/ozone/platform/dri/dri_buffer.h" |
| 15 #include "ui/ozone/platform/dri/dri_cursor.h" | 15 #include "ui/ozone/platform/dri/dri_cursor.h" |
| 16 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" | 16 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" |
| 17 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" | 17 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" |
| 18 #include "ui/ozone/platform/dri/dri_surface_factory.h" | 18 #include "ui/ozone/platform/dri/dri_surface_factory.h" |
| 19 #include "ui/ozone/platform/dri/dri_util.h" | 19 #include "ui/ozone/platform/dri/dri_util.h" |
| 20 #include "ui/ozone/platform/dri/dri_window.h" | 20 #include "ui/ozone/platform/dri/dri_window.h" |
| 21 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h" | 21 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h" |
| 22 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h" | 22 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h" |
| 23 #include "ui/ozone/platform/dri/dri_window_manager.h" | 23 #include "ui/ozone/platform/dri/dri_window_manager.h" |
| 24 #include "ui/ozone/platform/dri/dri_wrapper.h" | 24 #include "ui/ozone/platform/dri/dri_wrapper.h" |
| 25 #include "ui/ozone/platform/dri/drm_device_generator.h" |
| 25 #include "ui/ozone/platform/dri/drm_device_manager.h" | 26 #include "ui/ozone/platform/dri/drm_device_manager.h" |
| 26 #include "ui/ozone/platform/dri/native_display_delegate_dri.h" | 27 #include "ui/ozone/platform/dri/native_display_delegate_dri.h" |
| 27 #include "ui/ozone/platform/dri/native_display_delegate_proxy.h" | 28 #include "ui/ozone/platform/dri/native_display_delegate_proxy.h" |
| 28 #include "ui/ozone/platform/dri/screen_manager.h" | 29 #include "ui/ozone/platform/dri/screen_manager.h" |
| 29 #include "ui/ozone/public/ozone_platform.h" | 30 #include "ui/ozone/public/ozone_platform.h" |
| 30 #include "ui/ozone/public/ui_thread_gpu.h" | 31 #include "ui/ozone/public/ui_thread_gpu.h" |
| 31 | 32 |
| 32 #if defined(USE_XKBCOMMON) | 33 #if defined(USE_XKBCOMMON) |
| 33 #include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h" | 34 #include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h" |
| 34 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h" | 35 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 93 } |
| 93 void InitializeUI() override { | 94 void InitializeUI() override { |
| 94 dri_->Initialize(); | 95 dri_->Initialize(); |
| 95 // This makes sure that simple targets that do not handle display | 96 // This makes sure that simple targets that do not handle display |
| 96 // configuration can still use the primary display. | 97 // configuration can still use the primary display. |
| 97 ForceInitializationOfPrimaryDisplay(dri_, screen_manager_.get()); | 98 ForceInitializationOfPrimaryDisplay(dri_, screen_manager_.get()); |
| 98 drm_device_manager_.reset(new DrmDeviceManager(dri_)); | 99 drm_device_manager_.reset(new DrmDeviceManager(dri_)); |
| 99 display_manager_.reset(new DisplayManager()); | 100 display_manager_.reset(new DisplayManager()); |
| 100 surface_factory_ozone_.reset( | 101 surface_factory_ozone_.reset( |
| 101 new DriSurfaceFactory(&window_delegate_manager_)); | 102 new DriSurfaceFactory(&window_delegate_manager_)); |
| 102 scoped_ptr<NativeDisplayDelegateDri> ndd( | 103 scoped_ptr<NativeDisplayDelegateDri> ndd(new NativeDisplayDelegateDri( |
| 103 new NativeDisplayDelegateDri(screen_manager_.get(), dri_)); | 104 screen_manager_.get(), dri_, |
| 105 scoped_ptr<DrmDeviceGenerator>(new DrmDeviceGenerator()))); |
| 104 gpu_platform_support_.reset(new DriGpuPlatformSupport( | 106 gpu_platform_support_.reset(new DriGpuPlatformSupport( |
| 105 drm_device_manager_.get(), &window_delegate_manager_, | 107 drm_device_manager_.get(), &window_delegate_manager_, |
| 106 screen_manager_.get(), ndd.Pass())); | 108 screen_manager_.get(), ndd.Pass())); |
| 107 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); | 109 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); |
| 108 window_manager_.reset(new DriWindowManager()); | 110 window_manager_.reset(new DriWindowManager()); |
| 109 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); | 111 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); |
| 110 cursor_.reset( | 112 cursor_.reset( |
| 111 new DriCursor(window_manager_.get(), gpu_platform_support_host_.get())); | 113 new DriCursor(window_manager_.get(), gpu_platform_support_host_.get())); |
| 112 cursor_->Init(); | 114 cursor_->Init(); |
| 113 #if defined(USE_XKBCOMMON) | 115 #if defined(USE_XKBCOMMON) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 158 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
| 157 }; | 159 }; |
| 158 | 160 |
| 159 } // namespace | 161 } // namespace |
| 160 | 162 |
| 161 OzonePlatform* CreateOzonePlatformDri() { | 163 OzonePlatform* CreateOzonePlatformDri() { |
| 162 return new OzonePlatformDri; | 164 return new OzonePlatformDri; |
| 163 } | 165 } |
| 164 | 166 |
| 165 } // namespace ui | 167 } // namespace ui |
| OLD | NEW |