Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Side by Side Diff: ui/ozone/platform/drm/ozone_platform_gbm.cc

Issue 2510193002: Move use_xkbcommon from build to ui/base (Closed)
Patch Set: Typo Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/ozone/platform/drm/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/ozone/platform/drm/ozone_platform_gbm.h" 5 #include "ui/ozone/platform/drm/ozone_platform_gbm.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <gbm.h> 9 #include <gbm.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
11 #include <xf86drm.h> 11 #include <xf86drm.h>
12 12
13 #include <memory> 13 #include <memory>
14 #include <utility> 14 #include <utility>
15 15
16 #include "base/bind.h" 16 #include "base/bind.h"
17 #include "base/command_line.h" 17 #include "base/command_line.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/ptr_util.h" 19 #include "base/memory/ptr_util.h"
20 #include "services/service_manager/public/cpp/interface_factory.h" 20 #include "services/service_manager/public/cpp/interface_factory.h"
21 #include "services/service_manager/public/cpp/interface_registry.h" 21 #include "services/service_manager/public/cpp/interface_registry.h"
22 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 22 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
23 #include "ui/base/ui_features.h"
23 #include "ui/events/ozone/device/device_manager.h" 24 #include "ui/events/ozone/device/device_manager.h"
24 #include "ui/events/ozone/evdev/event_factory_evdev.h" 25 #include "ui/events/ozone/evdev/event_factory_evdev.h"
25 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" 26 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
26 #include "ui/ozone/platform/drm/common/drm_util.h" 27 #include "ui/ozone/platform/drm/common/drm_util.h"
27 #include "ui/ozone/platform/drm/cursor_proxy_mojo.h" 28 #include "ui/ozone/platform/drm/cursor_proxy_mojo.h"
28 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" 29 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h"
29 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" 30 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h"
30 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h" 31 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h"
31 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h" 32 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h"
32 #include "ui/ozone/platform/drm/gpu/drm_thread_proxy.h" 33 #include "ui/ozone/platform/drm/gpu/drm_thread_proxy.h"
33 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h" 34 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h"
34 #include "ui/ozone/platform/drm/gpu/proxy_helpers.h" 35 #include "ui/ozone/platform/drm/gpu/proxy_helpers.h"
35 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" 36 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h"
36 #include "ui/ozone/platform/drm/gpu/screen_manager.h" 37 #include "ui/ozone/platform/drm/gpu/screen_manager.h"
37 #include "ui/ozone/platform/drm/host/drm_cursor.h" 38 #include "ui/ozone/platform/drm/host/drm_cursor.h"
38 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h" 39 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h"
39 #include "ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h" 40 #include "ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h"
40 #include "ui/ozone/platform/drm/host/drm_native_display_delegate.h" 41 #include "ui/ozone/platform/drm/host/drm_native_display_delegate.h"
41 #include "ui/ozone/platform/drm/host/drm_overlay_manager.h" 42 #include "ui/ozone/platform/drm/host/drm_overlay_manager.h"
42 #include "ui/ozone/platform/drm/host/drm_window_host.h" 43 #include "ui/ozone/platform/drm/host/drm_window_host.h"
43 #include "ui/ozone/platform/drm/host/drm_window_host_manager.h" 44 #include "ui/ozone/platform/drm/host/drm_window_host_manager.h"
44 #include "ui/ozone/platform/drm/mus_thread_proxy.h" 45 #include "ui/ozone/platform/drm/mus_thread_proxy.h"
45 #include "ui/ozone/public/cursor_factory_ozone.h" 46 #include "ui/ozone/public/cursor_factory_ozone.h"
46 #include "ui/ozone/public/gpu_platform_support_host.h" 47 #include "ui/ozone/public/gpu_platform_support_host.h"
47 #include "ui/ozone/public/ozone_platform.h" 48 #include "ui/ozone/public/ozone_platform.h"
48 #include "ui/ozone/public/ozone_switches.h" 49 #include "ui/ozone/public/ozone_switches.h"
49 50
50 #if defined(USE_XKBCOMMON) 51 #if BUILDFLAG(USE_XKBCOMMON)
51 #include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h" 52 #include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h"
52 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h" 53 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h"
53 #else 54 #else
54 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" 55 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
55 #endif 56 #endif
56 57
57 namespace ui { 58 namespace ui {
58 59
59 namespace { 60 namespace {
60 61
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Currently, mojo mode uses mojo in a single process but this is 154 // Currently, mojo mode uses mojo in a single process but this is
154 // an interim implementation detail that will be eliminated in a 155 // an interim implementation detail that will be eliminated in a
155 // future CL. 156 // future CL.
156 single_process_ = args.single_process; 157 single_process_ = args.single_process;
157 using_mojo_ = args.connector != nullptr; 158 using_mojo_ = args.connector != nullptr;
158 DCHECK(!(using_mojo_ && single_process_)); 159 DCHECK(!(using_mojo_ && single_process_));
159 160
160 device_manager_ = CreateDeviceManager(); 161 device_manager_ = CreateDeviceManager();
161 window_manager_.reset(new DrmWindowHostManager()); 162 window_manager_.reset(new DrmWindowHostManager());
162 cursor_.reset(new DrmCursor(window_manager_.get())); 163 cursor_.reset(new DrmCursor(window_manager_.get()));
163 #if defined(USE_XKBCOMMON) 164 #if BUILDFLAG(USE_XKBCOMMON)
164 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 165 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
165 base::MakeUnique<XkbKeyboardLayoutEngine>(xkb_evdev_code_converter_)); 166 base::MakeUnique<XkbKeyboardLayoutEngine>(xkb_evdev_code_converter_));
166 #else 167 #else
167 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 168 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
168 base::MakeUnique<StubKeyboardLayoutEngine>()); 169 base::MakeUnique<StubKeyboardLayoutEngine>());
169 #endif 170 #endif
170 171
171 event_factory_ozone_.reset(new EventFactoryEvdev( 172 event_factory_ozone_.reset(new EventFactoryEvdev(
172 cursor_.get(), device_manager_.get(), 173 cursor_.get(), device_manager_.get(),
173 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine())); 174 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()));
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 std::unique_ptr<DrmWindowHostManager> window_manager_; 261 std::unique_ptr<DrmWindowHostManager> window_manager_;
261 std::unique_ptr<DrmCursor> cursor_; 262 std::unique_ptr<DrmCursor> cursor_;
262 std::unique_ptr<EventFactoryEvdev> event_factory_ozone_; 263 std::unique_ptr<EventFactoryEvdev> event_factory_ozone_;
263 std::unique_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_; 264 std::unique_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_;
264 std::unique_ptr<DrmDisplayHostManager> display_manager_; 265 std::unique_ptr<DrmDisplayHostManager> display_manager_;
265 std::unique_ptr<DrmOverlayManager> overlay_manager_; 266 std::unique_ptr<DrmOverlayManager> overlay_manager_;
266 267
267 // Bridges the DRM, GPU and main threads in mus. 268 // Bridges the DRM, GPU and main threads in mus.
268 std::unique_ptr<MusThreadProxy> mus_thread_proxy_; 269 std::unique_ptr<MusThreadProxy> mus_thread_proxy_;
269 270
270 #if defined(USE_XKBCOMMON) 271 #if BUILDFLAG(USE_XKBCOMMON)
271 XkbEvdevCodes xkb_evdev_code_converter_; 272 XkbEvdevCodes xkb_evdev_code_converter_;
272 #endif 273 #endif
273 274
274 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); 275 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm);
275 }; 276 };
276 277
277 } // namespace 278 } // namespace
278 279
279 OzonePlatform* CreateOzonePlatformGbm() { 280 OzonePlatform* CreateOzonePlatformGbm() {
280 return new OzonePlatformGbm; 281 return new OzonePlatformGbm;
281 } 282 }
282 283
283 } // namespace ui 284 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698