| # Copyright 2016 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/ui.gni") |
| import("//gpu/vulkan/features.gni") |
| import("//skia/features.gni") |
| import("//testing/test.gni") |
| if (is_mac) { |
| import("//build/config/mac/mac_sdk.gni") |
| } |
| import("//third_party/dawn/scripts/dawn_features.gni") |
| import("//ui/gl/features.gni") |
| |
| declare_args() { |
| subpixel_font_rendering_disabled = false |
| } |
| |
| component("service") { |
| output_name = "gpu_ipc_service" |
| sources = [ |
| "command_buffer_stub.cc", |
| "command_buffer_stub.h", |
| "context_url.cc", |
| "context_url.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_channel_shared_image_interface.cc", |
| "gpu_channel_shared_image_interface.h", |
| "gpu_config.h", |
| "gpu_init.cc", |
| "gpu_init.h", |
| "gpu_watchdog_thread.cc", |
| "gpu_watchdog_thread.h", |
| "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 (subpixel_font_rendering_disabled) { |
| defines += [ "SUBPIXEL_FONT_RENDERING_DISABLED" ] |
| } |
| if (dawn_use_built_dxc) { |
| defines += [ "DAWN_USE_BUILT_DXC" ] |
| } |
| public_deps = [ |
| "//base", |
| "//build:chromecast_buildflags", |
| "//components/viz/common", |
| "//gpu/config", |
| "//gpu/ipc/common", |
| "//ipc", |
| "//ui/base", |
| "//ui/display", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| "//ui/gl:buildflags", |
| "//ui/gl/init", |
| "//url", |
| ] |
| deps = [ |
| "//build:chromeos_buildflags", |
| |
| # 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", |
| "//components/viz/common/resources:shared_image_format", |
| "//gpu/command_buffer/common", |
| "//gpu/command_buffer/service", |
| "//gpu/command_buffer/service:gles2", |
| "//gpu/config", |
| "//gpu/vulkan:buildflags", |
| "//mojo/public/cpp/bindings", |
| "//ui/base:ozone_buildflags", |
| ] |
| libs = [] |
| ldflags = [] |
| if (is_win) { |
| sources += [ |
| "dcomp_texture_win.cc", |
| "dcomp_texture_win.h", |
| "image_transport_surface_win.cc", |
| ] |
| libs += [ |
| "d3d11.lib", |
| "dcomp.lib", |
| "dxguid.lib", |
| ] |
| } |
| if (is_apple) { |
| sources += [ |
| "image_transport_surface_overlay_mac.h", |
| "image_transport_surface_overlay_mac.mm", |
| ] |
| deps += [ "//ui/accelerated_widget_mac" ] |
| if (is_mac) { |
| sources += [ "image_transport_surface_mac.mm" ] |
| deps += [ |
| "//ui/display", |
| "//ui/display/types", |
| ] |
| lib_dirs = [ "$mac_sdk_path/usr/lib" ] |
| frameworks = [ |
| "CoreGraphics.framework", |
| "IOSurface.framework", |
| "OpenGL.framework", |
| "QuartzCore.framework", |
| ] |
| defines += [ "GL_SILENCE_DEPRECATION" ] |
| } |
| if (is_ios) { |
| sources += [ "image_transport_surface_ios.mm" ] |
| } |
| } |
| if (is_android) { |
| sources += [ "image_transport_surface_android.cc" ] |
| libs += [ "android" ] |
| } |
| if (is_linux || is_chromeos) { |
| sources += [ "image_transport_surface_linux.cc" ] |
| } |
| if (is_chromeos) { |
| sources += [ |
| "arc_shared_image_interface.cc", |
| "arc_shared_image_interface.h", |
| ] |
| deps += [ "//chromeos/ash/experiences/arc:arc_features" ] |
| } |
| if (use_ozone) { |
| deps += [ "//ui/ozone" ] |
| } |
| if (is_fuchsia) { |
| sources += [ "image_transport_surface_fuchsia.cc" ] |
| } |
| if (enable_vulkan) { |
| deps += [ "//gpu/vulkan/init" ] |
| } |
| |
| if (use_dawn || skia_use_dawn) { |
| deps += [ |
| "//third_party/dawn/src/dawn:proc", |
| "//third_party/dawn/src/dawn/native", |
| ] |
| } |
| if (skia_use_dawn) { |
| deps += [ "//third_party/dawn/include/dawn:cpp_headers" ] |
| } |
| } |