OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 import("//build/config/linux/pkg_config.gni") |
| 6 import("//ui/ozone/ozone.gni") |
| 7 |
| 8 declare_args() { |
| 9 use_mesa_platform_null = false |
| 10 use_drm_atomic = false |
| 11 } |
| 12 |
| 13 pkg_config("libdrm") { |
| 14 packages = [ "libdrm" ] |
| 15 } |
| 16 |
| 17 source_set("drm_common") { |
| 18 sources = [ |
| 19 "common/drm_gpu_test_helper_inprocess.cc", |
| 20 "common/drm_util.cc", |
| 21 "common/drm_util.h", |
| 22 "common/inprocess_messages.cc", |
| 23 "common/inprocess_messages.h", |
| 24 "common/scoped_drm_types.cc", |
| 25 "common/scoped_drm_types.h", |
| 26 "gpu/crtc_controller.cc", |
| 27 "gpu/crtc_controller.h", |
| 28 "gpu/drm_buffer.cc", |
| 29 "gpu/drm_buffer.h", |
| 30 "gpu/drm_console_buffer.cc", |
| 31 "gpu/drm_console_buffer.h", |
| 32 "gpu/drm_device.cc", |
| 33 "gpu/drm_device.h", |
| 34 "gpu/drm_device_generator.cc", |
| 35 "gpu/drm_device_generator.h", |
| 36 "gpu/drm_device_manager.cc", |
| 37 "gpu/drm_device_manager.h", |
| 38 "gpu/drm_display.cc", |
| 39 "gpu/drm_display.h", |
| 40 "gpu/drm_gpu_display_manager.cc", |
| 41 "gpu/drm_gpu_display_manager.h", |
| 42 "gpu/drm_gpu_platform_support.cc", |
| 43 "gpu/drm_gpu_platform_support.h", |
| 44 "gpu/drm_gpu_platform_support_inprocess.cc", |
| 45 "gpu/drm_surface.cc", |
| 46 "gpu/drm_surface.h", |
| 47 "gpu/drm_surface_factory.cc", |
| 48 "gpu/drm_surface_factory.h", |
| 49 "gpu/drm_vsync_provider.cc", |
| 50 "gpu/drm_vsync_provider.h", |
| 51 "gpu/drm_window.cc", |
| 52 "gpu/drm_window.h", |
| 53 "gpu/hardware_display_controller.cc", |
| 54 "gpu/hardware_display_controller.h", |
| 55 "gpu/hardware_display_plane.cc", |
| 56 "gpu/hardware_display_plane.h", |
| 57 "gpu/hardware_display_plane_manager.cc", |
| 58 "gpu/hardware_display_plane_manager.h", |
| 59 "gpu/hardware_display_plane_manager_legacy.cc", |
| 60 "gpu/hardware_display_plane_manager_legacy.h", |
| 61 "gpu/overlay_plane.cc", |
| 62 "gpu/overlay_plane.h", |
| 63 "gpu/page_flip_request.cc", |
| 64 "gpu/page_flip_request.h", |
| 65 "gpu/scanout_buffer.h", |
| 66 "gpu/screen_manager.cc", |
| 67 "gpu/screen_manager.h", |
| 68 "host/channel_observer.h", |
| 69 "host/drm_cursor.cc", |
| 70 "host/drm_cursor.h", |
| 71 "host/drm_device_handle.cc", |
| 72 "host/drm_device_handle.h", |
| 73 "host/drm_display_host.cc", |
| 74 "host/drm_display_host.h", |
| 75 "host/drm_display_host_manager.cc", |
| 76 "host/drm_display_host_manager.h", |
| 77 "host/drm_gpu_platform_support_host.cc", |
| 78 "host/drm_gpu_platform_support_host.h", |
| 79 "host/drm_gpu_platform_support_host_inprocess.cc", |
| 80 "host/drm_native_display_delegate.cc", |
| 81 "host/drm_native_display_delegate.h", |
| 82 "host/drm_overlay_candidates_host.cc", |
| 83 "host/drm_overlay_candidates_host.h", |
| 84 "host/drm_overlay_manager.cc", |
| 85 "host/drm_overlay_manager.h", |
| 86 "host/drm_window_host.cc", |
| 87 "host/drm_window_host.h", |
| 88 "host/drm_window_host_manager.cc", |
| 89 "host/drm_window_host_manager.h", |
| 90 ] |
| 91 |
| 92 defines = [ "OZONE_IMPLEMENTATION" ] |
| 93 |
| 94 if (use_drm_atomic) { |
| 95 defines += [ "USE_DRM_ATOMIC" ] |
| 96 sources += [ |
| 97 "gpu/hardware_display_plane_atomic.cc", |
| 98 "gpu/hardware_display_plane_atomic.h", |
| 99 "gpu/hardware_display_plane_manager_atomic.cc", |
| 100 "gpu/hardware_display_plane_manager_atomic.h", |
| 101 ] |
| 102 } |
| 103 |
| 104 deps = [ |
| 105 "//base", |
| 106 "//skia", |
| 107 "//ui/base", |
| 108 "//ui/display/types", |
| 109 "//ui/display/util", |
| 110 "//ui/events", |
| 111 "//ui/events/devices", |
| 112 "//ui/events/ozone:events_ozone", |
| 113 "//ui/events/ozone:events_ozone_evdev", |
| 114 "//ui/events/ozone:events_ozone_layout", |
| 115 "//ui/events/platform", |
| 116 "//ui/gfx", |
| 117 "//ui/gfx/geometry", |
| 118 "//ui/ozone:ozone_base", |
| 119 "//ui/platform_window", |
| 120 ] |
| 121 |
| 122 public_configs = [ ":libdrm" ] |
| 123 } |
| 124 |
| 125 if (ozone_platform_dri || ozone_platform_drm) { |
| 126 source_set("drm") { |
| 127 sources = [ |
| 128 "ozone_platform_drm.cc", |
| 129 "ozone_platform_drm.h", |
| 130 ] |
| 131 |
| 132 deps = [ |
| 133 ":drm_common", |
| 134 "//base", |
| 135 "//skia", |
| 136 "//ui/base", |
| 137 "//ui/ozone:ozone_base", |
| 138 "//ui/events/ozone:events_ozone", |
| 139 "//ui/events/ozone:events_ozone_evdev", |
| 140 "//ui/events/ozone:events_ozone_layout", |
| 141 ] |
| 142 } |
| 143 |
| 144 source_set("drm_unittests") { |
| 145 testonly = true |
| 146 sources = [ |
| 147 "gpu/drm_surface_unittest.cc", |
| 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 ] |
| 155 |
| 156 deps = [ |
| 157 "//base", |
| 158 "//skia", |
| 159 "//testing/gtest", |
| 160 "//ui/ozone:ozone_base", |
| 161 "//ui/ozone/platform/drm:drm_common", |
| 162 ] |
| 163 |
| 164 public_configs = [ ":libdrm" ] |
| 165 } |
| 166 } |
| 167 |
| 168 if (ozone_platform_gbm) { |
| 169 pkg_config("libgbm") { |
| 170 packages = [ "gbm" ] |
| 171 } |
| 172 |
| 173 source_set("gbm") { |
| 174 sources = [ |
| 175 "gpu/gbm_buffer.cc", |
| 176 "gpu/gbm_buffer.h", |
| 177 "gpu/gbm_buffer_base.cc", |
| 178 "gpu/gbm_buffer_base.h", |
| 179 "gpu/gbm_device.cc", |
| 180 "gpu/gbm_device.h", |
| 181 "gpu/gbm_surface.cc", |
| 182 "gpu/gbm_surface.h", |
| 183 "gpu/gbm_surface_factory.cc", |
| 184 "gpu/gbm_surface_factory.h", |
| 185 "gpu/gbm_surfaceless.cc", |
| 186 "gpu/gbm_surfaceless.h", |
| 187 "ozone_platform_gbm.cc", |
| 188 "ozone_platform_gbm.h", |
| 189 ] |
| 190 |
| 191 deps = [ |
| 192 ":drm_common", |
| 193 "//base", |
| 194 "//skia", |
| 195 "//ui/base", |
| 196 "//ui/events/ozone:events_ozone", |
| 197 "//ui/events/ozone:events_ozone_evdev", |
| 198 "//ui/events/ozone:events_ozone_layout", |
| 199 "//ui/gfx/geometry", |
| 200 "//ui/ozone:ozone_base", |
| 201 ] |
| 202 |
| 203 public_configs = [ |
| 204 ":libgbm", |
| 205 "//third_party/khronos:khronos_headers", |
| 206 ] |
| 207 |
| 208 if (use_mesa_platform_null) { |
| 209 defines += [ "USE_MESA_PLATFORM_NULL" ] |
| 210 } |
| 211 } |
| 212 } |
OLD | NEW |