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") {
19 "drm_surface_factory.cc",
20 "drm_surface_factory.h",
21 "gpu/crtc_controller.cc",
22 "gpu/crtc_controller.h",
23 "gpu/display_change_observer.h",
26 "gpu/drm_console_buffer.cc",
27 "gpu/drm_console_buffer.h",
30 "gpu/drm_device_generator.cc",
31 "gpu/drm_device_generator.h",
32 "gpu/drm_device_manager.cc",
33 "gpu/drm_device_manager.h",
34 "gpu/drm_display_mode.cc",
35 "gpu/drm_display_mode.h",
36 "gpu/drm_display_snapshot.cc",
37 "gpu/drm_display_snapshot.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",
46 "gpu/drm_vsync_provider.cc",
47 "gpu/drm_vsync_provider.h",
52 "gpu/hardware_display_controller.cc",
53 "gpu/hardware_display_controller.h",
54 "gpu/hardware_display_plane.cc",
55 "gpu/hardware_display_plane.h",
56 "gpu/hardware_display_plane_manager.cc",
57 "gpu/hardware_display_plane_manager.h",
58 "gpu/hardware_display_plane_manager_legacy.cc",
59 "gpu/hardware_display_plane_manager_legacy.h",
60 "gpu/overlay_plane.cc",
61 "gpu/overlay_plane.h",
62 "gpu/scanout_buffer.h",
63 "gpu/scoped_drm_types.cc",
64 "gpu/scoped_drm_types.h",
65 "gpu/screen_manager.cc",
66 "gpu/screen_manager.h",
67 "host/channel_observer.h",
68 "host/display_manager.cc",
69 "host/display_manager.h",
72 "host/drm_gpu_platform_support_host.cc",
73 "host/drm_gpu_platform_support_host.h",
74 "host/drm_native_display_delegate.cc",
75 "host/drm_native_display_delegate.h",
76 "host/drm_window_host.cc",
77 "host/drm_window_host.h",
78 "host/drm_window_host_manager.cc",
79 "host/drm_window_host_manager.h",
82 defines = [ "OZONE_IMPLEMENTATION" ]
85 defines += [ "USE_DRM_ATOMIC" ]
87 "gpu/hardware_display_plane_atomic.cc",
88 "gpu/hardware_display_plane_atomic.h",
89 "gpu/hardware_display_plane_manager_atomic.cc",
90 "gpu/hardware_display_plane_manager_atomic.h",
102 "//ui/events/devices",
103 "//ui/events/ozone:events_ozone_evdev",
104 "//ui/events/ozone:events_ozone_layout",
105 "//ui/events/platform",
110 public_configs = [ ":libdrm" ]
113 if (ozone_platform_dri || ozone_platform_drm) {
116 "ozone_platform_drm.cc",
117 "ozone_platform_drm.h",
124 "//ui/events/ozone:events_ozone_evdev",
125 "//ui/events/ozone:events_ozone_layout",
129 source_set("drm_unittests") {
132 "gpu/drm_surface_unittest.cc",
133 "gpu/drm_window_unittest.cc",
134 "gpu/hardware_display_controller_unittest.cc",
135 "gpu/hardware_display_plane_manager_unittest.cc",
136 "gpu/screen_manager_unittest.cc",
137 "test/mock_drm_wrapper.cc",
138 "test/mock_drm_wrapper.h",
147 public_configs = [ ":libdrm" ]
151 if (ozone_platform_gbm) {
152 pkg_config("libgbm") {
158 "gbm_surface_factory.cc",
159 "gbm_surface_factory.h",
162 "gpu/gbm_buffer_base.cc",
163 "gpu/gbm_buffer_base.h",
166 "gpu/gbm_surface.cc",
168 "gpu/gbm_surfaceless.cc",
169 "gpu/gbm_surfaceless.h",
170 "ozone_platform_gbm.cc",
171 "ozone_platform_gbm.h",
178 "//ui/events/ozone:events_ozone_evdev",
179 "//ui/events/ozone:events_ozone_layout",
182 public_configs = [ ":libgbm" ]
184 if (use_mesa_platform_null) {
185 defines += [ "USE_MESA_PLATFORM_NULL" ]