# 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") import("//gpu/vulkan/features.gni") visibility = [ "//ui/ozone/*" ] declare_args() { # Enables commiting of CRTC properties on page flip events. # This is not enabled by default because of a bug on Intel: # https://crbug.com/854753 drm_commit_properties_on_page_flip = false } source_set("gbm") { sources = [ "client_native_pixmap_factory_gbm.cc", "client_native_pixmap_factory_gbm.h", "common/display_types.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_framebuffer.cc", "gpu/drm_framebuffer.h", "gpu/drm_gpu_display_manager.cc", "gpu/drm_gpu_display_manager.h", "gpu/drm_gpu_util.cc", "gpu/drm_gpu_util.h", "gpu/drm_overlay_plane.cc", "gpu/drm_overlay_plane.h", "gpu/drm_overlay_validator.cc", "gpu/drm_overlay_validator.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_overlay_surface.cc", "gpu/gbm_overlay_surface.h", "gpu/gbm_pixmap.cc", "gpu/gbm_pixmap.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", "gpu/hardware_display_controller.cc", "gpu/hardware_display_controller.h", "gpu/hardware_display_plane.cc", "gpu/hardware_display_plane.h", "gpu/hardware_display_plane_atomic.cc", "gpu/hardware_display_plane_atomic.h", "gpu/hardware_display_plane_dummy.cc", "gpu/hardware_display_plane_dummy.h", "gpu/hardware_display_plane_manager.cc", "gpu/hardware_display_plane_manager.h", "gpu/hardware_display_plane_manager_atomic.cc", "gpu/hardware_display_plane_manager_atomic.h", "gpu/hardware_display_plane_manager_legacy.cc", "gpu/hardware_display_plane_manager_legacy.h", "gpu/inter_thread_messaging_proxy.cc", "gpu/inter_thread_messaging_proxy.h", "gpu/page_flip_request.cc", "gpu/page_flip_request.h", "gpu/proxy_helpers.cc", "gpu/proxy_helpers.h", "gpu/screen_manager.cc", "gpu/screen_manager.h", "host/drm_cursor.cc", "host/drm_cursor.h", "host/drm_device_connector.cc", "host/drm_device_connector.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", "host/gpu_thread_adapter.h", "host/gpu_thread_observer.h", "host/host_cursor_proxy.cc", "host/host_cursor_proxy.h", "host/host_drm_device.cc", "host/host_drm_device.h", "ozone_platform_gbm.cc", "ozone_platform_gbm.h", ] deps = [ "//base", "//gpu/vulkan:buildflags", "//ipc", "//mojo/public/cpp/system", "//services/service_manager/public/cpp", "//services/ui/public/interfaces:constants", "//skia", "//third_party/libdrm", "//third_party/libsync", "//third_party/minigbm", "//ui/base", "//ui/display", "//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/gl", "//ui/ozone:ozone_base", "//ui/ozone/common", "//ui/ozone/common/linux", "//ui/ozone/public/interfaces", "//ui/platform_window", ] if (enable_vulkan) { sources += [ "gpu/vulkan_implementation_gbm.cc", "gpu/vulkan_implementation_gbm.h", ] deps += [ "//gpu/vulkan" ] } public_configs = [ "//third_party/khronos:khronos_headers" ] defines = [ "OZONE_IMPLEMENTATION" ] if (drm_commit_properties_on_page_flip) { defines += [ "COMMIT_PROPERTIES_ON_PAGE_FLIP" ] } } source_set("gbm_unittests") { testonly = true sources = [ "common/drm_util_unittest.cc", "gpu/drm_overlay_validator_unittest.cc", "gpu/drm_window_unittest.cc", "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_gbm_device.cc", "gpu/mock_gbm_device.h", "gpu/proxy_helpers_unittest.cc", "gpu/screen_manager_unittest.cc", ] deps = [ ":gbm", "//base/test:test_support", "//skia", "//testing/gtest", "//third_party/libdrm", "//ui/gfx", "//ui/ozone:platform", "//ui/ozone/common", "//ui/ozone/common/linux", ] if (drm_commit_properties_on_page_flip) { defines = [ "COMMIT_PROPERTIES_ON_PAGE_FLIP" ] } }