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
12 # TODO(dshwang): remove this flag when all gbm hardware supports vgem map.
17 pkg_config("libdrm") {
18 packages = [ "libdrm" ]
23 "common/client_native_pixmap_factory_gbm.cc",
24 "common/client_native_pixmap_factory_gbm.h",
27 "common/scoped_drm_types.cc",
28 "common/scoped_drm_types.h",
29 "gpu/crtc_controller.cc",
30 "gpu/crtc_controller.h",
31 "gpu/display_change_observer.h",
34 "gpu/drm_console_buffer.cc",
35 "gpu/drm_console_buffer.h",
38 "gpu/drm_device_generator.cc",
39 "gpu/drm_device_generator.h",
40 "gpu/drm_device_manager.cc",
41 "gpu/drm_device_manager.h",
44 "gpu/drm_gpu_display_manager.cc",
45 "gpu/drm_gpu_display_manager.h",
46 "gpu/drm_gpu_platform_support.cc",
47 "gpu/drm_gpu_platform_support.h",
48 "gpu/drm_vsync_provider.cc",
49 "gpu/drm_vsync_provider.h",
54 "gpu/gbm_buffer_base.cc",
55 "gpu/gbm_buffer_base.h",
58 "gpu/gbm_surface_factory.cc",
59 "gpu/gbm_surface_factory.h",
60 "gpu/gbm_surfaceless.cc",
61 "gpu/gbm_surfaceless.h",
62 "gpu/hardware_display_controller.cc",
63 "gpu/hardware_display_controller.h",
64 "gpu/hardware_display_plane.cc",
65 "gpu/hardware_display_plane.h",
66 "gpu/hardware_display_plane_manager.cc",
67 "gpu/hardware_display_plane_manager.h",
68 "gpu/hardware_display_plane_manager_legacy.cc",
69 "gpu/hardware_display_plane_manager_legacy.h",
70 "gpu/overlay_plane.cc",
71 "gpu/overlay_plane.h",
72 "gpu/page_flip_request.cc",
73 "gpu/page_flip_request.h",
74 "gpu/scanout_buffer.h",
75 "gpu/screen_manager.cc",
76 "gpu/screen_manager.h",
77 "host/channel_observer.h",
80 "host/drm_device_handle.cc",
81 "host/drm_device_handle.h",
82 "host/drm_display_host.cc",
83 "host/drm_display_host.h",
84 "host/drm_display_host_manager.cc",
85 "host/drm_display_host_manager.h",
86 "host/drm_gpu_platform_support_host.cc",
87 "host/drm_gpu_platform_support_host.h",
88 "host/drm_native_display_delegate.cc",
89 "host/drm_native_display_delegate.h",
90 "host/drm_overlay_candidates_host.cc",
91 "host/drm_overlay_candidates_host.h",
92 "host/drm_overlay_manager.cc",
93 "host/drm_overlay_manager.h",
94 "host/drm_window_host.cc",
95 "host/drm_window_host.h",
96 "host/drm_window_host_manager.cc",
97 "host/drm_window_host_manager.h",
98 "ozone_platform_gbm.cc",
99 "ozone_platform_gbm.h",
106 "//third_party/minigbm",
108 "//ui/display/types",
111 "//ui/events/devices",
112 "//ui/events/ozone:events_ozone_evdev",
113 "//ui/events/ozone:events_ozone_layout",
114 "//ui/events/platform",
119 configs += [ ":libdrm" ]
121 public_configs = [ "//third_party/khronos:khronos_headers" ]
123 defines = [ "OZONE_IMPLEMENTATION" ]
125 if (use_drm_atomic) {
126 defines += [ "USE_DRM_ATOMIC" ]
128 "gpu/hardware_display_plane_atomic.cc",
129 "gpu/hardware_display_plane_atomic.h",
130 "gpu/hardware_display_plane_manager_atomic.cc",
131 "gpu/hardware_display_plane_manager_atomic.h",
136 defines += [ "USE_VGEM_MAP" ]
139 "gpu/client_native_pixmap_vgem.cc",
140 "gpu/client_native_pixmap_vgem.h",
145 source_set("gbm_unittests") {
148 "gpu/drm_window_unittest.cc",
149 "gpu/hardware_display_controller_unittest.cc",
150 "gpu/hardware_display_plane_manager_unittest.cc",
151 "gpu/screen_manager_unittest.cc",
152 "test/mock_drm_device.cc",
153 "test/mock_drm_device.h",
163 public_configs = [ ":libdrm" ]