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
3 # found in the LICENSE file.
5 import("//build/config/linux/pkg_config.gni")
6 import("//ui/ozone/ozone.gni")
9 use_mesa_platform_null = false
10 use_drm_atomic = false
13 pkg_config("libdrm") {
14 packages = [ "libdrm" ]
17 source_set("drm_common") {
21 "common/scoped_drm_types.cc",
22 "common/scoped_drm_types.h",
23 "gpu/crtc_controller.cc",
24 "gpu/crtc_controller.h",
25 "gpu/display_change_observer.h",
28 "gpu/drm_console_buffer.cc",
29 "gpu/drm_console_buffer.h",
32 "gpu/drm_device_generator.cc",
33 "gpu/drm_device_generator.h",
34 "gpu/drm_device_manager.cc",
35 "gpu/drm_device_manager.h",
38 "gpu/drm_gpu_display_manager.cc",
39 "gpu/drm_gpu_display_manager.h",
40 "gpu/drm_gpu_platform_support.cc",
41 "gpu/drm_gpu_platform_support.h",
44 "gpu/drm_surface_factory.cc",
45 "gpu/drm_surface_factory.h",
46 "gpu/drm_vsync_provider.cc",
47 "gpu/drm_vsync_provider.h",
50 "gpu/hardware_display_controller.cc",
51 "gpu/hardware_display_controller.h",
52 "gpu/hardware_display_plane.cc",
53 "gpu/hardware_display_plane.h",
54 "gpu/hardware_display_plane_manager.cc",
55 "gpu/hardware_display_plane_manager.h",
56 "gpu/hardware_display_plane_manager_legacy.cc",
57 "gpu/hardware_display_plane_manager_legacy.h",
58 "gpu/overlay_plane.cc",
59 "gpu/overlay_plane.h",
60 "gpu/page_flip_request.cc",
61 "gpu/page_flip_request.h",
62 "gpu/scanout_buffer.h",
63 "gpu/screen_manager.cc",
64 "gpu/screen_manager.h",
65 "host/channel_observer.h",
68 "host/drm_device_handle.cc",
69 "host/drm_device_handle.h",
70 "host/drm_display_host.cc",
71 "host/drm_display_host.h",
72 "host/drm_display_host_manager.cc",
73 "host/drm_display_host_manager.h",
74 "host/drm_gpu_platform_support_host.cc",
75 "host/drm_gpu_platform_support_host.h",
76 "host/drm_native_display_delegate.cc",
77 "host/drm_native_display_delegate.h",
78 "host/drm_overlay_candidates_host.cc",
79 "host/drm_overlay_candidates_host.h",
80 "host/drm_overlay_manager.cc",
81 "host/drm_overlay_manager.h",
82 "host/drm_window_host.cc",
83 "host/drm_window_host.h",
84 "host/drm_window_host_manager.cc",
85 "host/drm_window_host_manager.h",
88 defines = [ "OZONE_IMPLEMENTATION" ]
91 defines += [ "USE_DRM_ATOMIC" ]
93 "gpu/hardware_display_plane_atomic.cc",
94 "gpu/hardware_display_plane_atomic.h",
95 "gpu/hardware_display_plane_manager_atomic.cc",
96 "gpu/hardware_display_plane_manager_atomic.h",
105 "//ui/display/types",
108 "//ui/events/devices",
109 "//ui/events/ozone:events_ozone_evdev",
110 "//ui/events/ozone:events_ozone_layout",
111 "//ui/events/platform",
116 public_configs = [ ":libdrm" ]
119 if (ozone_platform_drm) {
122 "ozone_platform_drm.cc",
123 "ozone_platform_drm.h",
130 "//ui/events/ozone:events_ozone_evdev",
131 "//ui/events/ozone:events_ozone_layout",
135 source_set("drm_unittests") {
138 "gpu/drm_surface_unittest.cc",
139 "gpu/drm_window_unittest.cc",
140 "gpu/hardware_display_controller_unittest.cc",
141 "gpu/hardware_display_plane_manager_unittest.cc",
142 "gpu/screen_manager_unittest.cc",
143 "test/mock_drm_device.cc",
144 "test/mock_drm_device.h",
153 public_configs = [ ":libdrm" ]
157 if (ozone_platform_gbm) {
158 pkg_config("libgbm") {
166 "gpu/gbm_buffer_base.cc",
167 "gpu/gbm_buffer_base.h",
170 "gpu/gbm_surface.cc",
172 "gpu/gbm_surface_factory.cc",
173 "gpu/gbm_surface_factory.h",
174 "gpu/gbm_surfaceless.cc",
175 "gpu/gbm_surfaceless.h",
176 "ozone_platform_gbm.cc",
177 "ozone_platform_gbm.h",
184 "//ui/events/ozone:events_ozone_evdev",
185 "//ui/events/ozone:events_ozone_layout",
190 "//third_party/khronos:khronos_headers",
193 if (use_mesa_platform_null) {
194 defines += [ "USE_MESA_PLATFORM_NULL" ]