Linux: Depend on liberation-fonts package for RPMs.
[chromium-blink-merge.git] / ui / ozone / platform / drm / BUILD.gn
blobc345691575cdd053e6f902a895ead9020b4f52c0
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")
8 declare_args() {
9   use_mesa_platform_null = false
10   use_drm_atomic = false
12   # TODO(dshwang): remove this flag when all gbm hardware supports vgem map.
13   # crbug.com/519587
14   use_vgem_map = false
17 pkg_config("libdrm") {
18   packages = [ "libdrm" ]
21 source_set("gbm") {
22   sources = [
23     "common/client_native_pixmap_factory_gbm.cc",
24     "common/client_native_pixmap_factory_gbm.h",
25     "common/drm_util.cc",
26     "common/drm_util.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",
32     "gpu/drm_buffer.cc",
33     "gpu/drm_buffer.h",
34     "gpu/drm_console_buffer.cc",
35     "gpu/drm_console_buffer.h",
36     "gpu/drm_device.cc",
37     "gpu/drm_device.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",
42     "gpu/drm_display.cc",
43     "gpu/drm_display.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",
50     "gpu/drm_window.cc",
51     "gpu/drm_window.h",
52     "gpu/gbm_buffer.cc",
53     "gpu/gbm_buffer.h",
54     "gpu/gbm_buffer_base.cc",
55     "gpu/gbm_buffer_base.h",
56     "gpu/gbm_device.cc",
57     "gpu/gbm_device.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",
78     "host/drm_cursor.cc",
79     "host/drm_cursor.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",
100   ]
102   deps = [
103     "//base",
104     "//ipc",
105     "//skia",
106     "//third_party/minigbm",
107     "//ui/base",
108     "//ui/display/types",
109     "//ui/display/util",
110     "//ui/events",
111     "//ui/events/devices",
112     "//ui/events/ozone:events_ozone_evdev",
113     "//ui/events/ozone:events_ozone_layout",
114     "//ui/events/platform",
115     "//ui/gfx",
116     "//ui/gfx/geometry",
117   ]
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" ]
127     sources += [
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",
132     ]
133   }
135   if (use_vgem_map) {
136     defines += [ "USE_VGEM_MAP" ]
138     sources += [
139       "gpu/client_native_pixmap_vgem.cc",
140       "gpu/client_native_pixmap_vgem.h",
141     ]
142   }
145 source_set("gbm_unittests") {
146   testonly = true
147   sources = [
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",
154   ]
156   deps = [
157     "//skia",
158     "//testing/gtest",
159     "//ui/gfx",
160     "//ui/ozone",
161   ]
163   public_configs = [ ":libdrm" ]