| # Copyright 2016 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. |
| |
| visibility = [ "//ui/ozone/*" ] |
| |
| import("//build/config/linux/pkg_config.gni") |
| import("//ui/ozone/platform/wayland/wayland.gni") |
| |
| pkg_config("wayland-egl") { |
| packages = [ "wayland-egl" ] |
| } |
| |
| source_set("wayland") { |
| sources = [ |
| "client_native_pixmap_factory_wayland.cc", |
| "client_native_pixmap_factory_wayland.h", |
| "gl_surface_wayland.cc", |
| "gl_surface_wayland.h", |
| "gpu/wayland_connection_proxy.cc", |
| "gpu/wayland_connection_proxy.h", |
| "ozone_platform_wayland.cc", |
| "ozone_platform_wayland.h", |
| "wayland_buffer_manager.cc", |
| "wayland_buffer_manager.h", |
| "wayland_connection.cc", |
| "wayland_connection.h", |
| "wayland_connection_connector.cc", |
| "wayland_connection_connector.h", |
| "wayland_cursor.cc", |
| "wayland_cursor.h", |
| "wayland_data_device.cc", |
| "wayland_data_device.h", |
| "wayland_data_device_manager.cc", |
| "wayland_data_device_manager.h", |
| "wayland_data_offer.cc", |
| "wayland_data_offer.h", |
| "wayland_data_source.cc", |
| "wayland_data_source.h", |
| "wayland_input_method_context.cc", |
| "wayland_input_method_context.h", |
| "wayland_input_method_context_factory.cc", |
| "wayland_input_method_context_factory.h", |
| "wayland_keyboard.cc", |
| "wayland_keyboard.h", |
| "wayland_object.cc", |
| "wayland_object.h", |
| "wayland_output.cc", |
| "wayland_output.h", |
| "wayland_output_manager.cc", |
| "wayland_output_manager.h", |
| "wayland_pointer.cc", |
| "wayland_pointer.h", |
| "wayland_screen.cc", |
| "wayland_screen.h", |
| "wayland_surface_factory.cc", |
| "wayland_surface_factory.h", |
| "wayland_touch.cc", |
| "wayland_touch.h", |
| "wayland_util.cc", |
| "wayland_util.h", |
| "wayland_window.cc", |
| "wayland_window.h", |
| "xdg_popup_wrapper.h", |
| "xdg_popup_wrapper_v5.cc", |
| "xdg_popup_wrapper_v5.h", |
| "xdg_popup_wrapper_v6.cc", |
| "xdg_popup_wrapper_v6.h", |
| "xdg_surface_wrapper.cc", |
| "xdg_surface_wrapper.h", |
| "xdg_surface_wrapper_v5.cc", |
| "xdg_surface_wrapper_v5.h", |
| "xdg_surface_wrapper_v6.cc", |
| "xdg_surface_wrapper_v6.h", |
| "zwp_text_input_wrapper.h", |
| "zwp_text_input_wrapper_v1.cc", |
| "zwp_text_input_wrapper_v1.h", |
| ] |
| |
| import("//ui/base/ui_features.gni") |
| if (use_xkbcommon) { |
| sources += [ |
| "wayland_xkb_keyboard_layout_engine.cc", |
| "wayland_xkb_keyboard_layout_engine.h", |
| ] |
| configs += [ "//ui/events/ozone:xkbcommon" ] |
| } |
| |
| deps = [ |
| "//base", |
| "//build/config/linux/libdrm", |
| "//mojo/public/cpp/bindings", |
| "//skia", |
| "//third_party/minigbm", |
| "//third_party/wayland:wayland_client", |
| "//third_party/wayland-protocols:linux_dmabuf_protocol", |
| "//third_party/wayland-protocols:presentation_time_protocol", |
| "//third_party/wayland-protocols:text_input_protocol", |
| "//third_party/wayland-protocols:xdg_shell_protocol", |
| "//ui/base", |
| "//ui/base:ui_features", |
| "//ui/base/ime/linux", |
| "//ui/display/manager", |
| "//ui/events", |
| "//ui/events:dom_keycode_converter", |
| "//ui/events/keycodes:xkb", |
| "//ui/events/ozone:events_ozone", |
| "//ui/events/ozone:events_ozone_evdev", |
| "//ui/events/ozone:events_ozone_layout", |
| "//ui/events/platform", |
| "//ui/gfx", |
| "//ui/gfx:memory_buffer", |
| "//ui/gfx/geometry", |
| "//ui/ozone:ozone_base", |
| "//ui/ozone/common", |
| "//ui/ozone/common/linux:drm", |
| "//ui/ozone/public/interfaces/wayland:wayland_interfaces", |
| "//ui/platform_window", |
| "//ui/platform_window/platform_window_handler", |
| ] |
| |
| defines = [ "OZONE_IMPLEMENTATION" ] |
| |
| if (use_wayland_gbm) { |
| defines += [ "WAYLAND_GBM" ] |
| sources += [ |
| "gpu/drm_render_node_handle.cc", |
| "gpu/drm_render_node_handle.h", |
| "gpu/drm_render_node_path_finder.cc", |
| "gpu/drm_render_node_path_finder.h", |
| "gpu/gbm_pixmap_wayland.cc", |
| "gpu/gbm_pixmap_wayland.h", |
| "gpu/gbm_surfaceless_wayland.cc", |
| "gpu/gbm_surfaceless_wayland.h", |
| ] |
| |
| deps += [ |
| "//build/config/linux/libdrm", |
| "//ui/gfx:memory_buffer", |
| "//ui/ozone/common/linux:gbm", |
| ] |
| } |
| |
| configs += [ |
| ":wayland-egl", |
| "//third_party/khronos:khronos_headers", |
| ] |
| } |
| |
| source_set("wayland_unittests") { |
| testonly = true |
| |
| sources = [ |
| "fake_server.cc", |
| "fake_server.h", |
| "wayland_connection_unittest.cc", |
| "wayland_data_device_unittest.cc", |
| "wayland_input_method_context_unittest.cc", |
| "wayland_keyboard_unittest.cc", |
| "wayland_pointer_unittest.cc", |
| "wayland_screen_unittest.cc", |
| "wayland_surface_factory_unittest.cc", |
| "wayland_test.cc", |
| "wayland_test.h", |
| "wayland_touch_unittest.cc", |
| "wayland_window_unittest.cc", |
| ] |
| |
| deps = [ |
| ":wayland", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/wayland:wayland_server", |
| "//third_party/wayland-protocols:xdg_shell_protocol", |
| "//ui/base", |
| "//ui/base:ui_features", |
| "//ui/base/ime/linux", |
| "//ui/events/ozone:events_ozone_layout", |
| "//ui/ozone:platform", |
| "//ui/ozone:test_support", |
| ] |
| |
| import("//ui/base/ui_features.gni") |
| if (use_xkbcommon) { |
| deps += [ "//ui/events/keycodes:xkb" ] |
| } |
| |
| defines = [ "WL_HIDE_DEPRECATED" ] |
| if (use_wayland_gbm) { |
| defines += [ "WAYLAND_GBM" ] |
| } |
| } |