summaryrefslogtreecommitdiffstats
path: root/ui/ozone/platform/drm/BUILD.gn
blob: f41e3ad3d613ff365779859806345f3d7577e9fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/linux/pkg_config.gni")
import("//ui/ozone/ozone.gni")

declare_args() {
  use_mesa_platform_null = false
  use_drm_atomic = false
}

pkg_config("libdrm") {
  packages = [ "libdrm" ]
}

source_set("gbm") {
  sources = [
    "client_native_pixmap_factory_gbm.cc",
    "client_native_pixmap_factory_gbm.h",
    "common/drm_util.cc",
    "common/drm_util.h",
    "common/scoped_drm_types.cc",
    "common/scoped_drm_types.h",
    "gpu/crtc_controller.cc",
    "gpu/crtc_controller.h",
    "gpu/drm_buffer.cc",
    "gpu/drm_buffer.h",
    "gpu/drm_console_buffer.cc",
    "gpu/drm_console_buffer.h",
    "gpu/drm_device.cc",
    "gpu/drm_device.h",
    "gpu/drm_device_generator.cc",
    "gpu/drm_device_generator.h",
    "gpu/drm_device_manager.cc",
    "gpu/drm_device_manager.h",
    "gpu/drm_display.cc",
    "gpu/drm_display.h",
    "gpu/drm_gpu_display_manager.cc",
    "gpu/drm_gpu_display_manager.h",
    "gpu/drm_gpu_platform_support.cc",
    "gpu/drm_gpu_platform_support.h",
    "gpu/drm_thread.cc",
    "gpu/drm_thread.h",
    "gpu/drm_thread_message_proxy.cc",
    "gpu/drm_thread_message_proxy.h",
    "gpu/drm_thread_proxy.cc",
    "gpu/drm_thread_proxy.h",
    "gpu/drm_vsync_provider.cc",
    "gpu/drm_vsync_provider.h",
    "gpu/drm_window.cc",
    "gpu/drm_window.h",
    "gpu/drm_window_proxy.cc",
    "gpu/drm_window_proxy.h",
    "gpu/gbm_buffer.cc",
    "gpu/gbm_buffer.h",
    "gpu/gbm_buffer_base.cc",
    "gpu/gbm_buffer_base.h",
    "gpu/gbm_device.cc",
    "gpu/gbm_device.h",
    "gpu/gbm_surface_factory.cc",
    "gpu/gbm_surface_factory.h",
    "gpu/gbm_surfaceless.cc",
    "gpu/gbm_surfaceless.h",
    "gpu/hardware_display_controller.cc",
    "gpu/hardware_display_controller.h",
    "gpu/hardware_display_plane.cc",
    "gpu/hardware_display_plane.h",
    "gpu/hardware_display_plane_manager.cc",
    "gpu/hardware_display_plane_manager.h",
    "gpu/hardware_display_plane_manager_legacy.cc",
    "gpu/hardware_display_plane_manager_legacy.h",
    "gpu/overlay_plane.cc",
    "gpu/overlay_plane.h",
    "gpu/page_flip_request.cc",
    "gpu/page_flip_request.h",
    "gpu/proxy_helpers.cc",
    "gpu/proxy_helpers.h",
    "gpu/scanout_buffer.h",
    "gpu/screen_manager.cc",
    "gpu/screen_manager.h",
    "host/channel_observer.h",
    "host/drm_cursor.cc",
    "host/drm_cursor.h",
    "host/drm_device_handle.cc",
    "host/drm_device_handle.h",
    "host/drm_display_host.cc",
    "host/drm_display_host.h",
    "host/drm_display_host_manager.cc",
    "host/drm_display_host_manager.h",
    "host/drm_gpu_platform_support_host.cc",
    "host/drm_gpu_platform_support_host.h",
    "host/drm_native_display_delegate.cc",
    "host/drm_native_display_delegate.h",
    "host/drm_overlay_candidates_host.cc",
    "host/drm_overlay_candidates_host.h",
    "host/drm_overlay_manager.cc",
    "host/drm_overlay_manager.h",
    "host/drm_window_host.cc",
    "host/drm_window_host.h",
    "host/drm_window_host_manager.cc",
    "host/drm_window_host_manager.h",
    "ozone_platform_gbm.cc",
    "ozone_platform_gbm.h",
  ]

  deps = [
    "//base",
    "//ipc",
    "//skia",
    "//third_party/minigbm",
    "//ui/base",
    "//ui/display/types",
    "//ui/display/util",
    "//ui/events",
    "//ui/events/devices",
    "//ui/events/ozone:events_ozone",
    "//ui/events/ozone:events_ozone_evdev",
    "//ui/events/ozone:events_ozone_layout",
    "//ui/events/platform",
    "//ui/gfx",
    "//ui/gfx/geometry",
    "//ui/ozone:ozone_base",
  ]

  configs += [ ":libdrm" ]

  public_configs = [ "//third_party/khronos:khronos_headers" ]

  defines = [ "OZONE_IMPLEMENTATION" ]

  if (use_drm_atomic) {
    defines += [ "USE_DRM_ATOMIC" ]
    sources += [
      "gpu/hardware_display_plane_atomic.cc",
      "gpu/hardware_display_plane_atomic.h",
      "gpu/hardware_display_plane_manager_atomic.cc",
      "gpu/hardware_display_plane_manager_atomic.h",
    ]
  }

  if (use_vgem_map) {
    configs += [ "//ui/ozone:vgem_map" ]

    sources += [
      "common/client_native_pixmap_vgem.cc",
      "common/client_native_pixmap_vgem.h",
    ]
  }
}

source_set("gbm_unittests") {
  testonly = true
  sources = [
    "gpu/drm_window_unittest.cc",
    "gpu/fake_plane_info.cc",
    "gpu/fake_plane_info.h",
    "gpu/hardware_display_controller_unittest.cc",
    "gpu/hardware_display_plane_manager_unittest.cc",
    "gpu/mock_drm_device.cc",
    "gpu/mock_drm_device.h",
    "gpu/mock_dumb_buffer_generator.cc",
    "gpu/mock_dumb_buffer_generator.h",
    "gpu/mock_hardware_display_plane_manager.cc",
    "gpu/mock_hardware_display_plane_manager.h",
    "gpu/mock_scanout_buffer.cc",
    "gpu/mock_scanout_buffer.h",
    "gpu/screen_manager_unittest.cc",
  ]

  deps = [
    ":gbm",
    "//skia",
    "//testing/gtest",
    "//ui/gfx",
    "//ui/ozone",
  ]

  public_configs = [ ":libdrm" ]
}