Fix search results being clipped in app list.
[chromium-blink-merge.git] / ui / ozone / platform / drm / BUILD.gn
blob9cc58f88e3a93bda0ef4eba324fdfaedc68a9617
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
13 pkg_config("libdrm") {
14   packages = [ "libdrm" ]
17 source_set("drm_common") {
18   sources = [
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",
24     "gpu/drm_buffer.cc",
25     "gpu/drm_buffer.h",
26     "gpu/drm_console_buffer.cc",
27     "gpu/drm_console_buffer.h",
28     "gpu/drm_device.cc",
29     "gpu/drm_device.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",
42     "gpu/drm_surface.cc",
43     "gpu/drm_surface.h",
44     "gpu/drm_util.cc",
45     "gpu/drm_util.h",
46     "gpu/drm_vsync_provider.cc",
47     "gpu/drm_vsync_provider.h",
48     "gpu/drm_window.cc",
49     "gpu/drm_window.h",
50     "gpu/gpu_lock.cc",
51     "gpu/gpu_lock.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",
70     "host/drm_cursor.cc",
71     "host/drm_cursor.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",
80   ]
82   defines = [ "OZONE_IMPLEMENTATION" ]
84   if (use_drm_atomic) {
85     defines += [ "USE_DRM_ATOMIC" ]
86     sources += [
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",
91     ]
92   }
94   deps = [
95     "//base",
96     "//skia",
97     "//ipc",
98     "//ui/base",
99     "//ui/display/types",
100     "//ui/display/util",
101     "//ui/events",
102     "//ui/events/devices",
103     "//ui/events/ozone:events_ozone_evdev",
104     "//ui/events/ozone:events_ozone_layout",
105     "//ui/events/platform",
106     "//ui/gfx",
107     "//ui/gfx/geometry",
108   ]
110   public_configs = [ ":libdrm" ]
113 if (ozone_platform_dri || ozone_platform_drm) {
114   source_set("drm") {
115     sources = [
116       "ozone_platform_drm.cc",
117       "ozone_platform_drm.h",
118     ]
120     deps = [
121       ":drm_common",
122       "//base",
123       "//skia",
124       "//ui/events/ozone:events_ozone_evdev",
125       "//ui/events/ozone:events_ozone_layout",
126     ]
127   }
129   source_set("drm_unittests") {
130     testonly = true
131     sources = [
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",
139     ]
141     deps = [
142       "//skia",
143       "//testing/gtest",
144       "//ui/ozone",
145     ]
147     public_configs = [ ":libdrm" ]
148   }
151 if (ozone_platform_gbm) {
152   pkg_config("libgbm") {
153     packages = [ "gbm" ]
154   }
156   source_set("gbm") {
157     sources = [
158       "gbm_surface_factory.cc",
159       "gbm_surface_factory.h",
160       "gpu/gbm_buffer.cc",
161       "gpu/gbm_buffer.h",
162       "gpu/gbm_buffer_base.cc",
163       "gpu/gbm_buffer_base.h",
164       "gpu/gbm_device.cc",
165       "gpu/gbm_device.h",
166       "gpu/gbm_surface.cc",
167       "gpu/gbm_surface.h",
168       "gpu/gbm_surfaceless.cc",
169       "gpu/gbm_surfaceless.h",
170       "ozone_platform_gbm.cc",
171       "ozone_platform_gbm.h",
172     ]
174     deps = [
175       ":drm_common",
176       "//base",
177       "//skia",
178       "//ui/events/ozone:events_ozone_evdev",
179       "//ui/events/ozone:events_ozone_layout",
180     ]
182     public_configs = [ ":libgbm" ]
184     if (use_mesa_platform_null) {
185       defines += [ "USE_MESA_PLATFORM_NULL" ]
186     }
187   }