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
12 pkg_config("libdrm") {
13 packages = [ "libdrm" ]
16 source_set("dri_common") {
21 "display_change_observer.h",
24 "display_mode_dri.cc",
26 "display_snapshot_dri.cc",
27 "display_snapshot_dri.h",
28 "dri_console_buffer.cc",
29 "dri_console_buffer.h",
34 "dri_gpu_platform_support.cc",
35 "dri_gpu_platform_support_.h",
36 "dri_gpu_platform_support_host.cc",
37 "dri_gpu_platform_support_host.h",
38 "dri_helper_thread.cc",
39 "dri_helper_thread.h",
42 "dri_surface_factory.cc",
43 "dri_surface_factory.h",
46 "dri_vsync_provider.cc",
47 "dri_vsync_provider.h",
50 "dri_window_delegate.h",
51 "dri_window_delegate_impl.cc",
52 "dri_window_delegate_impl.h",
53 "dri_window_delegate_manager.cc",
54 "dri_window_delegate_manager.h",
55 "dri_window_manager.cc",
56 "dri_window_manager.h",
59 "hardware_display_controller.cc",
60 "hardware_display_controller.h",
61 "hardware_display_plane.cc",
62 "hardware_display_plane.h",
63 "hardware_display_plane_manager.cc",
64 "hardware_display_plane_manager.h",
65 "hardware_display_plane_manager_legacy.cc",
66 "hardware_display_plane_manager_legacy.h",
67 "native_display_delegate_dri.cc",
68 "native_display_delegate_dri.h",
69 "native_display_delegate_proxy.cc",
70 "native_display_delegate_proxy.h",
73 "scoped_drm_types.cc",
88 "//ui/events/ozone:events_ozone_evdev",
89 "//ui/events/ozone:events_ozone_layout",
94 public_configs = [ ":libdrm" ]
97 if (ozone_platform_dri) {
100 "ozone_platform_dri.cc",
101 "ozone_platform_dri.h",
108 "//ui/events/ozone:events_ozone_evdev",
109 "//ui/events/ozone:events_ozone_layout",
113 source_set("dri_unittests") {
116 "dri_surface_unittest.cc",
117 "dri_window_delegate_impl_unittest.cc",
118 "hardware_display_controller_unittest.cc",
119 "hardware_display_manager_unittest.cc",
120 "screen_manager_unittest.cc",
121 "test/mock_dri_wrapper.cc",
122 "test/mock_dri_wrapper.h",
133 if (ozone_platform_gbm) {
134 pkg_config("libgbm") {
142 "gbm_buffer_base.cc",
146 "gbm_surfaceless.cc",
148 "gbm_surface_factory.cc",
149 "gbm_surface_factory.h",
152 "ozone_platform_gbm.cc",
153 "ozone_platform_gbm.h",
160 "//ui/events/ozone:events_ozone_evdev",
161 "//ui/events/ozone:events_ozone_layout",
164 public_configs = [ ":libgbm" ]
166 if (use_mesa_platform_null) {
167 defines += [ "USE_MESA_PLATFORM_NULL" ]