OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 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("//testing/test.gni") |
| 6 import("//build/config/ui.gni") |
| 7 if (is_mac) { |
| 8 import("//build/config/mac/mac_sdk.gni") |
| 9 } |
| 10 |
| 11 group("service") { |
| 12 if (is_component_build) { |
| 13 public_deps = [ |
| 14 "//gpu", |
| 15 ] |
| 16 } else { |
| 17 public_deps = [ |
| 18 ":ipc_service_sources", |
| 19 ] |
| 20 } |
| 21 } |
| 22 |
| 23 source_set("ipc_service_sources") { |
| 24 visibility = [ "//gpu/*" ] |
| 25 sources = [ |
| 26 "gpu_channel.cc", |
| 27 "gpu_channel.h", |
| 28 "gpu_channel_manager.cc", |
| 29 "gpu_channel_manager.h", |
| 30 "gpu_channel_manager_delegate.h", |
| 31 "gpu_command_buffer_stub.cc", |
| 32 "gpu_command_buffer_stub.h", |
| 33 "gpu_config.h", |
| 34 "gpu_memory_buffer_factory.cc", |
| 35 "gpu_memory_buffer_factory.h", |
| 36 "gpu_memory_manager.cc", |
| 37 "gpu_memory_manager.h", |
| 38 "gpu_memory_tracking.cc", |
| 39 "gpu_memory_tracking.h", |
| 40 "gpu_watchdog.h", |
| 41 "image_transport_surface.h", |
| 42 "pass_through_image_transport_surface.cc", |
| 43 "pass_through_image_transport_surface.h", |
| 44 ] |
| 45 configs += [ "//gpu:gpu_implementation" ] |
| 46 public_deps = [ |
| 47 "//base", |
| 48 "//ipc", |
| 49 "//ui/events:events_base", |
| 50 "//ui/gfx", |
| 51 "//ui/gfx/geometry", |
| 52 "//ui/gl", |
| 53 "//url", |
| 54 ] |
| 55 deps = [ |
| 56 "//gpu/command_buffer/common:common_sources", |
| 57 "//gpu/command_buffer/service:service_sources", |
| 58 "//gpu/ipc/common:ipc_common_sources", |
| 59 ] |
| 60 libs = [] |
| 61 if (is_win) { |
| 62 sources += [ |
| 63 "child_window_surface_win.cc", |
| 64 "child_window_surface_win.h", |
| 65 "image_transport_surface_win.cc", |
| 66 ] |
| 67 } |
| 68 if (is_mac) { |
| 69 sources += [ |
| 70 "ca_layer_partial_damage_tree_mac.h", |
| 71 "ca_layer_partial_damage_tree_mac.mm", |
| 72 "ca_layer_tree_mac.h", |
| 73 "ca_layer_tree_mac.mm", |
| 74 "gpu_memory_buffer_factory_io_surface.cc", |
| 75 "gpu_memory_buffer_factory_io_surface.h", |
| 76 "image_transport_surface_mac.mm", |
| 77 "image_transport_surface_overlay_mac.h", |
| 78 "image_transport_surface_overlay_mac.mm", |
| 79 ] |
| 80 deps += [ |
| 81 "//skia", |
| 82 "//ui/accelerated_widget_mac", |
| 83 ] |
| 84 lib_dirs = [ "$mac_sdk_path/usr/lib" ] |
| 85 libs += [ |
| 86 "AVFoundation.framework", |
| 87 "CoreMedia.framework", |
| 88 "QuartzCore.framework", |
| 89 ] |
| 90 } |
| 91 if (is_android) { |
| 92 sources += [ |
| 93 "gpu_memory_buffer_factory_surface_texture.cc", |
| 94 "gpu_memory_buffer_factory_surface_texture.h", |
| 95 "image_transport_surface_android.cc", |
| 96 "stream_texture_android.cc", |
| 97 "stream_texture_android.h", |
| 98 ] |
| 99 libs += [ "android" ] |
| 100 } |
| 101 if (is_linux) { |
| 102 sources += [ "image_transport_surface_linux.cc" ] |
| 103 } |
| 104 if (use_x11) { |
| 105 sources += [ "x_util.h" ] |
| 106 } |
| 107 if (use_ozone) { |
| 108 sources += [ |
| 109 "gpu_memory_buffer_factory_ozone_native_pixmap.cc", |
| 110 "gpu_memory_buffer_factory_ozone_native_pixmap.h", |
| 111 ] |
| 112 deps += [ "//ui/ozone" ] |
| 113 } |
| 114 } |
| 115 |
| 116 source_set("test_support") { |
| 117 testonly = true |
| 118 sources = [ |
| 119 "gpu_memory_buffer_factory_test_template.h", |
| 120 ] |
| 121 public_deps = [ |
| 122 ":service", |
| 123 "//testing/gtest:gtest", |
| 124 ] |
| 125 deps = [ |
| 126 "//gpu/ipc/common", |
| 127 ] |
| 128 } |
| 129 |
| 130 test("gpu_ipc_service_unittests") { |
| 131 configs += [ "//build/config:precompiled_headers" ] |
| 132 sources = [ |
| 133 "gpu_channel_manager_unittest.cc", |
| 134 "gpu_channel_test_common.cc", |
| 135 "gpu_channel_test_common.h", |
| 136 "gpu_channel_unittest.cc", |
| 137 ] |
| 138 deps = [ |
| 139 ":service", |
| 140 ":test_support", |
| 141 "//base", |
| 142 "//base/test:run_all_unittests", |
| 143 "//base/test:test_support", |
| 144 "//gpu/command_buffer/common", |
| 145 "//gpu/command_buffer/service", |
| 146 "//gpu/config", |
| 147 "//gpu/ipc/common", |
| 148 "//ipc:test_support", |
| 149 "//skia", |
| 150 "//testing/gtest", |
| 151 "//third_party/mesa:mesa_headers", |
| 152 "//ui/gfx:test_support", |
| 153 "//url", |
| 154 ] |
| 155 libs = [] |
| 156 if (is_android) { |
| 157 sources += [ "gpu_memory_buffer_factory_surface_texture_unittest.cc" ] |
| 158 } |
| 159 if (is_mac) { |
| 160 sources += [ |
| 161 "ca_layer_tree_unittest_mac.mm", |
| 162 "gpu_memory_buffer_factory_io_surface_unittest.cc", |
| 163 ] |
| 164 deps += [ "//ui/accelerated_widget_mac" ] |
| 165 libs += [ |
| 166 "AVFoundation.framework", |
| 167 "CoreMedia.framework", |
| 168 "QuartzCore.framework", |
| 169 ] |
| 170 } |
| 171 if (use_ozone) { |
| 172 sources += [ "gpu_memory_buffer_factory_ozone_native_pixmap_unittest.cc" ] |
| 173 deps += [ "//ui/ozone" ] |
| 174 } |
| 175 } |
OLD | NEW |