| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 } | 91 } |
| 91 void InitializeUI() override { | 92 void InitializeUI() override { |
| 92 dri_->Initialize(); | 93 dri_->Initialize(); |
| 93 // This makes sure that simple targets that do not handle display | 94 // This makes sure that simple targets that do not handle display |
| 94 // configuration can still use the primary display. | 95 // configuration can still use the primary display. |
| 95 ForceInitializationOfPrimaryDisplay(dri_, screen_manager_.get()); | 96 ForceInitializationOfPrimaryDisplay(dri_, screen_manager_.get()); |
| 96 drm_device_manager_.reset(new DrmDeviceManager(dri_)); | 97 drm_device_manager_.reset(new DrmDeviceManager(dri_)); |
| 97 display_manager_.reset(new DisplayManager()); | 98 display_manager_.reset(new DisplayManager()); |
| 98 surface_factory_ozone_.reset( | 99 surface_factory_ozone_.reset( |
| 99 new DriSurfaceFactory(&window_delegate_manager_)); | 100 new DriSurfaceFactory(&window_delegate_manager_)); |
| 100 scoped_ptr<NativeDisplayDelegateDri> ndd( | 101 scoped_ptr<NativeDisplayDelegateDri> ndd(new NativeDisplayDelegateDri( |
| 101 new NativeDisplayDelegateDri(screen_manager_.get(), dri_)); | 102 screen_manager_.get(), dri_, |
| 103 scoped_ptr<DrmDeviceGenerator>(new DrmDeviceGenerator()))); |
| 102 gpu_platform_support_.reset(new DriGpuPlatformSupport( | 104 gpu_platform_support_.reset(new DriGpuPlatformSupport( |
| 103 drm_device_manager_.get(), &window_delegate_manager_, | 105 drm_device_manager_.get(), &window_delegate_manager_, |
| 104 screen_manager_.get(), ndd.Pass())); | 106 screen_manager_.get(), ndd.Pass())); |
| 105 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); | 107 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); |
| 106 window_manager_.reset(new DriWindowManager()); | 108 window_manager_.reset(new DriWindowManager()); |
| 107 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); | 109 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); |
| 108 cursor_.reset( | 110 cursor_.reset( |
| 109 new DriCursor(window_manager_.get(), gpu_platform_support_host_.get())); | 111 new DriCursor(window_manager_.get(), gpu_platform_support_host_.get())); |
| 110 cursor_->Init(); | 112 cursor_->Init(); |
| 111 #if defined(USE_XKBCOMMON) | 113 #if defined(USE_XKBCOMMON) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 156 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
| 155 }; | 157 }; |
| 156 | 158 |
| 157 } // namespace | 159 } // namespace |
| 158 | 160 |
| 159 OzonePlatform* CreateOzonePlatformDri() { | 161 OzonePlatform* CreateOzonePlatformDri() { |
| 160 return new OzonePlatformDri; | 162 return new OzonePlatformDri; |
| 161 } | 163 } |
| 162 | 164 |
| 163 } // namespace ui | 165 } // namespace ui |
| OLD | NEW |