| Index: ui/ozone/platform/drm/BUILD.gn
 | 
| diff --git a/ui/ozone/platform/drm/BUILD.gn b/ui/ozone/platform/drm/BUILD.gn
 | 
| new file mode 100644
 | 
| index 0000000000000000000000000000000000000000..ef0d786e2a922d3b2bece70cadbb1f45e5508dca
 | 
| --- /dev/null
 | 
| +++ b/ui/ozone/platform/drm/BUILD.gn
 | 
| @@ -0,0 +1,212 @@
 | 
| +# 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("drm_common") {
 | 
| +  sources = [
 | 
| +    "common/drm_gpu_test_helper_inprocess.cc",
 | 
| +    "common/drm_util.cc",
 | 
| +    "common/drm_util.h",
 | 
| +    "common/inprocess_messages.cc",
 | 
| +    "common/inprocess_messages.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_gpu_platform_support_inprocess.cc",
 | 
| +    "gpu/drm_surface.cc",
 | 
| +    "gpu/drm_surface.h",
 | 
| +    "gpu/drm_surface_factory.cc",
 | 
| +    "gpu/drm_surface_factory.h",
 | 
| +    "gpu/drm_vsync_provider.cc",
 | 
| +    "gpu/drm_vsync_provider.h",
 | 
| +    "gpu/drm_window.cc",
 | 
| +    "gpu/drm_window.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/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_gpu_platform_support_host_inprocess.cc",
 | 
| +    "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",
 | 
| +  ]
 | 
| +
 | 
| +  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",
 | 
| +    ]
 | 
| +  }
 | 
| +
 | 
| +  deps = [
 | 
| +    "//base",
 | 
| +    "//skia",
 | 
| +    "//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",
 | 
| +    "//ui/platform_window",
 | 
| +  ]
 | 
| +
 | 
| +  public_configs = [ ":libdrm" ]
 | 
| +}
 | 
| +
 | 
| +if (ozone_platform_dri || ozone_platform_drm) {
 | 
| +  source_set("drm") {
 | 
| +    sources = [
 | 
| +      "ozone_platform_drm.cc",
 | 
| +      "ozone_platform_drm.h",
 | 
| +    ]
 | 
| +
 | 
| +    deps = [
 | 
| +      ":drm_common",
 | 
| +      "//base",
 | 
| +      "//skia",
 | 
| +      "//ui/base",
 | 
| +      "//ui/ozone:ozone_base",
 | 
| +      "//ui/events/ozone:events_ozone",
 | 
| +      "//ui/events/ozone:events_ozone_evdev",
 | 
| +      "//ui/events/ozone:events_ozone_layout",
 | 
| +    ]
 | 
| +  }
 | 
| +
 | 
| +  source_set("drm_unittests") {
 | 
| +    testonly = true
 | 
| +    sources = [
 | 
| +      "gpu/drm_surface_unittest.cc",
 | 
| +      "gpu/drm_window_unittest.cc",
 | 
| +      "gpu/hardware_display_controller_unittest.cc",
 | 
| +      "gpu/hardware_display_plane_manager_unittest.cc",
 | 
| +      "gpu/screen_manager_unittest.cc",
 | 
| +      "test/mock_drm_device.cc",
 | 
| +      "test/mock_drm_device.h",
 | 
| +    ]
 | 
| +
 | 
| +    deps = [
 | 
| +      "//base",
 | 
| +      "//skia",
 | 
| +      "//testing/gtest",
 | 
| +      "//ui/ozone:ozone_base",
 | 
| +      "//ui/ozone/platform/drm:drm_common",
 | 
| +    ]
 | 
| +
 | 
| +    public_configs = [ ":libdrm" ]
 | 
| +  }
 | 
| +}
 | 
| +
 | 
| +if (ozone_platform_gbm) {
 | 
| +  pkg_config("libgbm") {
 | 
| +    packages = [ "gbm" ]
 | 
| +  }
 | 
| +
 | 
| +  source_set("gbm") {
 | 
| +    sources = [
 | 
| +      "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.cc",
 | 
| +      "gpu/gbm_surface.h",
 | 
| +      "gpu/gbm_surface_factory.cc",
 | 
| +      "gpu/gbm_surface_factory.h",
 | 
| +      "gpu/gbm_surfaceless.cc",
 | 
| +      "gpu/gbm_surfaceless.h",
 | 
| +      "ozone_platform_gbm.cc",
 | 
| +      "ozone_platform_gbm.h",
 | 
| +    ]
 | 
| +
 | 
| +    deps = [
 | 
| +      ":drm_common",
 | 
| +      "//base",
 | 
| +      "//skia",
 | 
| +      "//ui/base",
 | 
| +      "//ui/events/ozone:events_ozone",
 | 
| +      "//ui/events/ozone:events_ozone_evdev",
 | 
| +      "//ui/events/ozone:events_ozone_layout",
 | 
| +      "//ui/gfx/geometry",
 | 
| +      "//ui/ozone:ozone_base",
 | 
| +    ]
 | 
| +
 | 
| +    public_configs = [
 | 
| +      ":libgbm",
 | 
| +      "//third_party/khronos:khronos_headers",
 | 
| +    ]
 | 
| +
 | 
| +    if (use_mesa_platform_null) {
 | 
| +      defines += [ "USE_MESA_PLATFORM_NULL" ]
 | 
| +    }
 | 
| +  }
 | 
| +}
 | 
| 
 |