BUILD.gn 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # Copyright 2017 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. import("//build/config/ui.gni")
  5. import("//components/viz/viz.gni")
  6. import("//testing/libfuzzer/fuzzer_test.gni")
  7. viz_component("host") {
  8. defines = [ "VIZ_HOST_IMPLEMENTATION" ]
  9. sources = [
  10. "client_frame_sink_video_capturer.cc",
  11. "client_frame_sink_video_capturer.h",
  12. "compositing_mode_reporter_impl.cc",
  13. "compositing_mode_reporter_impl.h",
  14. "gpu_client.cc",
  15. "gpu_client.h",
  16. "gpu_client_delegate.h",
  17. "gpu_host_impl.cc",
  18. "gpu_host_impl.h",
  19. "hit_test/hit_test_query.cc",
  20. "hit_test/hit_test_query.h",
  21. "hit_test/hit_test_region_observer.h",
  22. "host_display_client.cc",
  23. "host_display_client.h",
  24. "host_frame_sink_client.h",
  25. "host_frame_sink_manager.cc",
  26. "host_frame_sink_manager.h",
  27. "host_gpu_memory_buffer_manager.cc",
  28. "host_gpu_memory_buffer_manager.h",
  29. "renderer_settings_creation.cc",
  30. "renderer_settings_creation.h",
  31. "viz_host_export.h",
  32. ]
  33. if (is_win) {
  34. sources += [
  35. "layered_window_updater_impl.cc",
  36. "layered_window_updater_impl.h",
  37. ]
  38. }
  39. deps = [
  40. "//base",
  41. "//build:chromeos_buildflags",
  42. "//gpu/ipc/client",
  43. "//gpu/ipc/common",
  44. "//services/viz/privileged/mojom",
  45. "//ui/base",
  46. "//ui/gfx",
  47. ]
  48. public_deps = [
  49. "//components/viz/common",
  50. "//gpu/command_buffer/client",
  51. "//gpu/ipc/host",
  52. "//services/viz/privileged/mojom/compositing",
  53. "//services/viz/public/mojom",
  54. "//ui/gfx/geometry",
  55. ]
  56. if (is_mac) {
  57. deps += [ "//ui/accelerated_widget_mac" ]
  58. }
  59. if (use_ozone) {
  60. deps += [ "//ui/ozone" ]
  61. }
  62. }
  63. viz_source_set("unit_tests") {
  64. testonly = true
  65. sources = [
  66. "hit_test/hit_test_query_unittest.cc",
  67. "host_frame_sink_manager_unittest.cc",
  68. "host_gpu_memory_buffer_manager_unittest.cc",
  69. ]
  70. deps = [
  71. ":host",
  72. "//base",
  73. "//base/test:test_support",
  74. "//build:chromeos_buildflags",
  75. "//components/viz/test:test_support",
  76. "//gpu",
  77. "//gpu/ipc/host",
  78. "//media:media_buildflags",
  79. "//mojo/public/cpp/bindings",
  80. "//services/viz/privileged/mojom",
  81. "//services/viz/public/mojom",
  82. "//testing/gmock",
  83. "//testing/gtest",
  84. ]
  85. if (use_ozone) {
  86. deps += [ "//ui/ozone" ]
  87. }
  88. }
  89. fuzzer_test("hit_test_query_fuzzer") {
  90. sources = [ "hit_test/hit_test_query_fuzzer.cc" ]
  91. libfuzzer_options = [ "max_len=4096" ]
  92. deps = [
  93. ":host",
  94. "//base/test:test_support",
  95. "//components/viz/test:test_support",
  96. ]
  97. }