| # 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. |
| |
| import("//build/config/jumbo.gni") |
| import("//build/config/ui.gni") |
| import("//gpu/vulkan/features.gni") |
| import("//testing/test.gni") |
| if (is_mac) { |
| import("//build/config/mac/mac_sdk.gni") |
| } |
| |
| jumbo_component("service") { |
| output_name = "gpu_ipc_service" |
| sources = [ |
| "command_buffer_stub.cc", |
| "command_buffer_stub.h", |
| "gles2_command_buffer_stub.cc", |
| "gles2_command_buffer_stub.h", |
| "gpu_channel.cc", |
| "gpu_channel.h", |
| "gpu_channel_manager.cc", |
| "gpu_channel_manager.h", |
| "gpu_channel_manager_delegate.h", |
| "gpu_config.h", |
| "gpu_init.cc", |
| "gpu_init.h", |
| "gpu_memory_buffer_factory.cc", |
| "gpu_memory_buffer_factory.h", |
| "gpu_watchdog_thread.cc", |
| "gpu_watchdog_thread.h", |
| "image_decode_accelerator_stub.cc", |
| "image_decode_accelerator_stub.h", |
| "image_decode_accelerator_worker.h", |
| "image_transport_surface.h", |
| "image_transport_surface_delegate.h", |
| "pass_through_image_transport_surface.cc", |
| "pass_through_image_transport_surface.h", |
| "raster_command_buffer_stub.cc", |
| "raster_command_buffer_stub.h", |
| "shared_image_stub.cc", |
| "shared_image_stub.h", |
| "webgpu_command_buffer_stub.cc", |
| "webgpu_command_buffer_stub.h", |
| ] |
| defines = [ "GPU_IPC_SERVICE_IMPLEMENTATION" ] |
| if (is_chromecast) { |
| defines += [ "IS_CHROMECAST" ] |
| } |
| public_deps = [ |
| "//base", |
| "//components/viz/common", |
| "//ipc", |
| "//ui/base", |
| "//ui/display", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:buildflags", |
| "//ui/gl/init", |
| "//url", |
| ] |
| deps = [ |
| "//base/third_party/dynamic_annotations", |
| |
| # crbug.com/799267: crash_key needs to be added explicitly for Windows and |
| # Mac even though it's not directly referenced, because it's being |
| # implicitly depended upon by gpu/config/gpu_crash_keys.h but deps (even |
| # public ones) are not transitive for static libraries. |
| "//components/crash/core/common:crash_key", |
| "//gpu/command_buffer/common", |
| "//gpu/command_buffer/service", |
| "//gpu/command_buffer/service:gles2", |
| "//gpu/config", |
| "//gpu/ipc/common", |
| "//gpu/vulkan:buildflags", |
| ] |
| libs = [] |
| ldflags = [] |
| if (is_win) { |
| sources += [ |
| "child_window_win.cc", |
| "child_window_win.h", |
| "direct_composition_child_surface_win.cc", |
| "direct_composition_child_surface_win.h", |
| "direct_composition_surface_win.cc", |
| "direct_composition_surface_win.h", |
| "gpu_memory_buffer_factory_dxgi.cc", |
| "gpu_memory_buffer_factory_dxgi.h", |
| "image_transport_surface_win.cc", |
| ] |
| libs += [ |
| "dxgi.lib", |
| "dwmapi.lib", |
| ] |
| ldflags += [ "/DELAYLOAD:dxgi.dll" ] |
| } |
| if (is_mac) { |
| sources += [ |
| "gpu_memory_buffer_factory_io_surface.cc", |
| "gpu_memory_buffer_factory_io_surface.h", |
| "image_transport_surface_mac.mm", |
| "image_transport_surface_overlay_mac.h", |
| "image_transport_surface_overlay_mac.mm", |
| ] |
| deps += [ "//ui/accelerated_widget_mac" ] |
| lib_dirs = [ "$mac_sdk_path/usr/lib" ] |
| libs += [ |
| "CoreGraphics.framework", |
| "IOSurface.framework", |
| "OpenGL.framework", |
| "QuartzCore.framework", |
| ] |
| } |
| if (is_android) { |
| sources += [ |
| "gpu_memory_buffer_factory_android_hardware_buffer.cc", |
| "gpu_memory_buffer_factory_android_hardware_buffer.h", |
| "image_transport_surface_android.cc", |
| "stream_texture_android.cc", |
| "stream_texture_android.h", |
| ] |
| libs += [ "android" ] |
| } |
| if (is_linux) { |
| sources += [ |
| "gpu_memory_buffer_factory_native_pixmap.cc", |
| "gpu_memory_buffer_factory_native_pixmap.h", |
| "image_transport_surface_linux.cc", |
| ] |
| } |
| if (use_x11) { |
| sources += [ "x_util.h" ] |
| libs += [ "X11" ] |
| } |
| if (use_ozone) { |
| deps += [ "//ui/ozone" ] |
| } |
| if (is_fuchsia) { |
| sources += [ "image_transport_surface_fuchsia.cc" ] |
| } |
| if (enable_vulkan) { |
| deps += [ "//gpu/vulkan/init" ] |
| } |
| } |
| |
| source_set("test_support") { |
| testonly = true |
| sources = [ |
| "gpu_memory_buffer_factory_test_template.h", |
| ] |
| public_deps = [ |
| ":service", |
| "//testing/gtest:gtest", |
| ] |
| deps = [ |
| "//gpu/ipc/common", |
| "//ui/gl:test_support", |
| ] |
| } |