| # 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("//components/nacl/toolchain.gni") |
| import("//gpu/vulkan/features.gni") |
| import("//mojo/public/tools/bindings/mojom.gni") |
| |
| group("common") { |
| if (is_component_build) { |
| public_deps = [ "//gpu" ] |
| } else { |
| public_deps = [ ":ipc_common_sources" ] |
| } |
| } |
| |
| group("command_buffer_traits") { |
| if (is_component_build) { |
| public_deps = [ "//gpu" ] |
| } else { |
| public_deps = [ ":command_buffer_traits_sources" ] |
| } |
| } |
| |
| source_set("command_buffer_traits_sources") { |
| # External code should depend on this via |
| # //gpu/ipc/common:command_buffer_traits above rather than depending on this |
| # directly or the component build will break. |
| visibility = [ "//gpu/*" ] |
| |
| sources = [ |
| "gpu_command_buffer_traits.cc", |
| "gpu_command_buffer_traits.h", |
| "gpu_command_buffer_traits_multi.h", |
| ] |
| |
| configs += [ |
| "//gpu:gpu_implementation", |
| "//third_party/khronos:khronos_headers", |
| ] |
| |
| public_deps = [ |
| "//gpu/command_buffer/common:common_sources", |
| "//ipc", |
| "//ui/gfx/ipc", |
| ] |
| |
| deps = [ |
| "//base", |
| "//gpu/ipc/common:vulkan_ycbcr_info", |
| "//ui/gfx/ipc/buffer_types", |
| "//ui/gfx/ipc/geometry", |
| ] |
| |
| if (!is_nacl && !is_minimal_toolchain) { |
| deps += [ "//ui/gfx/ipc/skia" ] |
| } |
| } |
| |
| source_set("memory_stats_sources") { |
| sources = [ |
| "memory_stats.cc", |
| "memory_stats.h", |
| ] |
| public_deps = [ "//base" ] |
| configs += [ "//gpu:gpu_implementation" ] |
| } |
| |
| source_set("gpu_peak_memory") { |
| sources = [ "gpu_peak_memory.h" ] |
| } |
| |
| source_set("ipc_common_sources") { |
| # External code should depend on this via //gpu/ipc/common above rather than |
| # depending on this directly or the component build will break. |
| visibility = [ "//gpu/*" ] |
| |
| sources = [ |
| "command_buffer_id.h", |
| "gpu_client_ids.h", |
| "gpu_disk_cache_type.cc", |
| "gpu_disk_cache_type.h", |
| "gpu_memory_buffer_impl.cc", |
| "gpu_memory_buffer_impl.h", |
| "gpu_memory_buffer_impl_shared_memory.cc", |
| "gpu_memory_buffer_impl_shared_memory.h", |
| "gpu_memory_buffer_support.cc", |
| "gpu_memory_buffer_support.h", |
| "gpu_param_traits.cc", |
| "gpu_param_traits.h", |
| "gpu_param_traits_macros.h", |
| "gpu_watchdog_timeout.h", |
| "result_codes.h", |
| ] |
| |
| if (is_win) { |
| sources += [ |
| "dxgi_helpers.cc", |
| "dxgi_helpers.h", |
| "gpu_memory_buffer_impl_dxgi.cc", |
| "gpu_memory_buffer_impl_dxgi.h", |
| ] |
| libs = [ "d3d11.lib" ] |
| } |
| if (use_ozone) { |
| sources += [ |
| "gpu_memory_buffer_impl_native_pixmap.cc", |
| "gpu_memory_buffer_impl_native_pixmap.h", |
| ] |
| } |
| if (is_android) { |
| sources += [ |
| "gpu_memory_buffer_impl_android_hardware_buffer.cc", |
| "gpu_memory_buffer_impl_android_hardware_buffer.h", |
| ] |
| visibility += [ "//media/gpu:gpu" ] |
| } |
| |
| configs += [ |
| "//gpu:gpu_implementation", |
| "//third_party/khronos:khronos_headers", |
| ] |
| |
| public_deps = [ |
| ":command_buffer_traits_sources", |
| ":gpu_channel_mojom", |
| ":gpu_peak_memory", |
| ":interfaces_cpp_sources", |
| ":memory_stats_sources", |
| ":surface_handle_type", |
| ":vulkan_ycbcr_info", |
| "//ipc", |
| "//url/ipc:url_ipc", |
| ] |
| |
| deps = [ |
| "//base", |
| "//components/viz/common:resource_format", |
| "//gpu/command_buffer/client:client_sources", |
| "//gpu/command_buffer/common:common_sources", |
| "//gpu/config:config_sources", |
| "//third_party/libyuv", |
| "//ui/base", |
| "//ui/gfx:color_space", |
| "//ui/gfx/geometry", |
| "//ui/gfx/ipc", |
| "//ui/gfx/ipc/buffer_types", |
| "//ui/gfx/ipc/color", |
| "//ui/gfx/ipc/geometry", |
| "//ui/gl", |
| ] |
| |
| if (is_apple) { |
| sources += [ |
| "gpu_memory_buffer_impl_io_surface.cc", |
| "gpu_memory_buffer_impl_io_surface.h", |
| ] |
| frameworks = [ "IOSurface.framework" ] |
| } |
| |
| if (!is_nacl && !is_minimal_toolchain) { |
| deps += [ "//ui/gfx/ipc/skia" ] |
| } |
| |
| if (is_android) { |
| sources += [ |
| "android/scoped_surface_request_conduit.cc", |
| "android/scoped_surface_request_conduit.h", |
| "gpu_surface_lookup.cc", |
| "gpu_surface_lookup.h", |
| "gpu_surface_tracker.cc", |
| "gpu_surface_tracker.h", |
| ] |
| libs = [ "android" ] |
| } |
| |
| if (use_ozone) { |
| deps += [ "//ui/ozone" ] |
| } |
| } |
| |
| # Depend on this to use surface_handle.h without pulling in all of gpu ipc. |
| source_set("surface_handle_type") { |
| public = [ "surface_handle.h" ] |
| |
| public_deps = [ "//ui/gfx:native_widget_types" ] |
| } |
| |
| component("vulkan_ycbcr_info") { |
| sources = [ |
| "vulkan_ycbcr_info.cc", |
| "vulkan_ycbcr_info.h", |
| ] |
| deps = [ "//base" ] |
| configs += [ "//gpu:gpu_implementation" ] |
| } |
| |
| source_set("vulkan_types") { |
| sources = [ "vulkan_types.h" ] |
| public_deps = [ "//ui/gfx" ] |
| all_dependent_configs = |
| [ "//third_party/vulkan-deps/vulkan-headers/src:vulkan_headers_config" ] |
| configs += [ "//gpu:gpu_implementation" ] |
| } |
| |
| mojom("gpu_channel_mojom") { |
| visibility = [ ":ipc_common_sources" ] |
| |
| sources = [ "gpu_channel.mojom" ] |
| |
| public_deps = [ |
| ":surface_handle", |
| "//mojo/public/mojom/base", |
| "//services/viz/public/mojom:resource_format", |
| "//services/viz/public/mojom:shared_image_format", |
| "//skia/public/mojom", |
| "//ui/gfx/geometry/mojom", |
| "//ui/gfx/mojom", |
| "//ui/gl/mojom", |
| "//url/mojom:url_mojom_gurl", |
| ] |
| |
| mojom_source_deps = [ ":interfaces" ] |
| |
| cpp_typemaps = [ |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.ContextColorspace" |
| cpp = "::gpu::ColorSpace" |
| }, |
| { |
| mojom = "gpu.mojom.ContextCreationAttribs" |
| cpp = "::gpu::ContextCreationAttribs" |
| }, |
| { |
| mojom = "gpu.mojom.ContextType" |
| cpp = "::gpu::ContextType" |
| }, |
| ] |
| traits_headers = [ "context_creation_attribs_mojom_traits.h" ] |
| traits_sources = [ "context_creation_attribs_mojom_traits.cc" ] |
| traits_public_deps = [ "//gpu/command_buffer/common:common_base_sources" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.Error" |
| cpp = "::gpu::error::Error" |
| }, |
| { |
| mojom = "gpu.mojom.ContextLostReason" |
| cpp = "::gpu::error::ContextLostReason" |
| }, |
| { |
| mojom = "gpu.mojom.CommandBufferState" |
| cpp = "::gpu::CommandBuffer::State" |
| }, |
| ] |
| traits_headers = [ "command_buffer_mojom_traits.h" ] |
| traits_sources = [ "command_buffer_mojom_traits.cc" ] |
| traits_public_deps = [ "//gpu/command_buffer/common:common_sources" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.SchedulingPriority" |
| cpp = "::gpu::SchedulingPriority" |
| }, |
| ] |
| traits_headers = [ "scheduling_priority_mojom_traits.h" ] |
| traits_public_deps = [ "//gpu/command_buffer/common:common_base_sources" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.SwapBuffersCompleteParams" |
| cpp = "::gpu::SwapBuffersCompleteParams" |
| }, |
| ] |
| traits_headers = [ "gpu_param_traits_macros.h" ] |
| }, |
| ] |
| |
| # Unlike some definitions in ":interfaces_mojom", these bindings are never |
| # used in Blink. We disable variants to simplify the dependency graph. |
| disable_variants = true |
| |
| export_class_attribute = "GPU_EXPORT" |
| export_header = "gpu/gpu_export.h" |
| cpp_configs = [ "//gpu:gpu_implementation" ] |
| } |
| |
| mojom("gmb_interface") { |
| generate_java = true |
| visibility = [ |
| "//gpu/*", |
| "//services/*", |
| ] |
| sources = [ "client_gmb_interface.mojom" ] |
| deps = [ |
| ":surface_handle", |
| "//mojo/public/mojom/base", |
| "//ui/gfx/geometry/mojom", |
| "//ui/gfx/mojom", |
| ] |
| } |
| |
| mojom("surface_handle") { |
| generate_java = true |
| sources = [ "surface_handle.mojom" ] |
| cpp_typemaps = [ |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.SurfaceHandle" |
| cpp = "::gpu::SurfaceHandle" |
| copyable_pass_by_value = true |
| }, |
| ] |
| traits_headers = [ "surface_handle_mojom_traits.h" ] |
| traits_public_deps = [ "//ui/gfx:native_widget_types" ] |
| }, |
| ] |
| } |
| |
| mojom("interfaces") { |
| generate_java = true |
| sources = [ |
| "capabilities.mojom", |
| "context_result.mojom", |
| "device_perf_info.mojom", |
| "dx_diag_node.mojom", |
| "gpu_disk_cache_type.mojom", |
| "gpu_feature_info.mojom", |
| "gpu_info.mojom", |
| "gpu_peak_memory.mojom", |
| "mailbox.mojom", |
| "mailbox_holder.mojom", |
| "memory_stats.mojom", |
| "sync_token.mojom", |
| "vulkan_ycbcr_info.mojom", |
| ] |
| |
| if (is_win) { |
| sources += [ "luid.mojom" ] |
| } |
| |
| public_deps = [ |
| ":gpu_preferences_interface", |
| ":surface_handle", |
| "//mojo/public/mojom/base", |
| "//ui/gfx/geometry/mojom", |
| "//ui/gfx/mojom", |
| "//ui/gl/mojom", |
| ] |
| enabled_features = [] |
| if (enable_vulkan) { |
| public_deps += [ ":vulkan_interface" ] |
| enabled_features += [ "supports_vulkan" ] |
| } |
| if (is_win || is_chromeos || is_chromeos_lacros) { |
| enabled_features += [ "has_gpu_revision_info" ] |
| } |
| |
| cpp_typemaps = [ |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.Capabilities" |
| cpp = "::gpu::Capabilities" |
| }, |
| ] |
| traits_headers = [ "gpu_command_buffer_traits.h" ] |
| traits_public_deps = [ ":command_buffer_traits_sources" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.ContextResult" |
| cpp = "::gpu::ContextResult" |
| }, |
| ] |
| traits_headers = [ "context_result_mojom_traits.h" ] |
| traits_public_deps = [ "//gpu/command_buffer/common:common_base_sources" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.IntelGpuGeneration" |
| cpp = "::gpu::IntelGpuGeneration" |
| }, |
| { |
| mojom = "gpu.mojom.D3D_FEATURE_LEVEL" |
| cpp = "::D3D_FEATURE_LEVEL" |
| }, |
| { |
| mojom = "gpu.mojom.DevicePerfInfo" |
| cpp = "::gpu::DevicePerfInfo" |
| }, |
| ] |
| traits_sources = [ "device_perf_info_mojom_traits.cc" ] |
| traits_headers = [ "device_perf_info_mojom_traits.h" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.DxDiagNode" |
| cpp = "::gpu::DxDiagNode" |
| }, |
| ] |
| traits_sources = [ "dx_diag_node_mojom_traits.cc" ] |
| traits_headers = [ "dx_diag_node_mojom_traits.h" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.GpuFeatureStatus" |
| cpp = "::gpu::GpuFeatureStatus" |
| }, |
| { |
| mojom = "gpu.mojom.GpuFeatureInfo" |
| cpp = "::gpu::GpuFeatureInfo" |
| }, |
| ] |
| traits_sources = [ "gpu_feature_info_mojom_traits.cc" ] |
| traits_headers = [ "gpu_feature_info_mojom_traits.h" ] |
| traits_public_deps = [ |
| "//gpu/config:config_sources", |
| "//ui/gfx/geometry/mojom", |
| ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.CollectInfoResult" |
| cpp = "::gpu::CollectInfoResult" |
| }, |
| { |
| mojom = "gpu.mojom.OverlayInfo" |
| cpp = "::gpu::OverlayInfo" |
| }, |
| { |
| mojom = "gpu.mojom.GpuDevice" |
| cpp = "::gpu::GPUInfo::GPUDevice" |
| }, |
| { |
| mojom = "gpu.mojom.GpuInfo" |
| cpp = "::gpu::GPUInfo" |
| }, |
| { |
| mojom = "gpu.mojom.VideoCodecProfile" |
| cpp = "::gpu::VideoCodecProfile" |
| }, |
| { |
| mojom = "gpu.mojom.VideoDecodeAcceleratorSupportedProfile" |
| cpp = "::gpu::VideoDecodeAcceleratorSupportedProfile" |
| }, |
| { |
| mojom = "gpu.mojom.VideoDecodeAcceleratorCapabilities" |
| cpp = "::gpu::VideoDecodeAcceleratorCapabilities" |
| }, |
| { |
| mojom = "gpu.mojom.VideoEncodeAcceleratorSupportedProfile" |
| cpp = "::gpu::VideoEncodeAcceleratorSupportedProfile" |
| }, |
| { |
| mojom = "gpu.mojom.ImageDecodeAcceleratorSupportedProfile" |
| cpp = "::gpu::ImageDecodeAcceleratorSupportedProfile" |
| }, |
| ] |
| traits_sources = [ "gpu_info_mojom_traits.cc" ] |
| traits_headers = [ "gpu_info_mojom_traits.h" ] |
| traits_public_deps = [ |
| "//gpu/config:config_sources", |
| "//ui/gfx/geometry/mojom", |
| ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.GpuPeakMemoryAllocationSource" |
| cpp = "::gpu::GpuPeakMemoryAllocationSource" |
| }, |
| ] |
| traits_headers = [ "gpu_peak_memory_mojom_traits.h" ] |
| traits_public_deps = [ ":gpu_peak_memory" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.Mailbox" |
| cpp = "::gpu::Mailbox" |
| }, |
| ] |
| traits_headers = [ "mailbox_mojom_traits.h" ] |
| traits_public_deps = [ ":mojom_traits" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.MailboxHolder" |
| cpp = "::gpu::MailboxHolder" |
| }, |
| ] |
| traits_headers = [ "mailbox_holder_mojom_traits.h" ] |
| traits_public_deps = [ ":mojom_traits" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.SyncToken" |
| cpp = "::gpu::SyncToken" |
| }, |
| ] |
| traits_headers = [ "sync_token_mojom_traits.h" ] |
| traits_public_deps = [ ":mojom_traits" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.VideoMemoryProcessStats" |
| cpp = "::gpu::VideoMemoryUsageStats::ProcessStats" |
| }, |
| { |
| mojom = "gpu.mojom.VideoMemoryUsageStats" |
| cpp = "::gpu::VideoMemoryUsageStats" |
| }, |
| ] |
| traits_headers = [ "memory_stats_mojom_traits.h" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.VulkanYCbCrInfo" |
| cpp = "::gpu::VulkanYCbCrInfo" |
| copyable_pass_by_value = true |
| }, |
| ] |
| traits_headers = [ "vulkan_ycbcr_info_mojom_traits.h" ] |
| }, |
| { |
| types = [ |
| # Each specific handle is declared here to ensure that nullable is set. |
| { |
| mojom = "gpu.mojom.GpuDiskCacheGlShaderHandle" |
| cpp = "::gpu::GpuDiskCacheGlShaderHandle" |
| nullable_is_same_type = true |
| }, |
| { |
| mojom = "gpu.mojom.GpuDiskCacheDawnWebGPUHandle" |
| cpp = "::gpu::GpuDiskCacheDawnWebGPUHandle" |
| nullable_is_same_type = true |
| }, |
| |
| # General types that are the ones generally exposed in interfaces. |
| { |
| mojom = "gpu.mojom.GpuDiskCacheHandle" |
| cpp = "::gpu::GpuDiskCacheHandle" |
| nullable_is_same_type = true |
| }, |
| { |
| mojom = "gpu.mojom.GpuDiskCacheType" |
| cpp = "::gpu::GpuDiskCacheType" |
| }, |
| ] |
| traits_sources = [ "gpu_disk_cache_type_mojom_traits.cc" ] |
| traits_headers = [ "gpu_disk_cache_type_mojom_traits.h" ] |
| }, |
| ] |
| |
| blink_cpp_typemaps = [ |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.Mailbox" |
| cpp = "::gpu::Mailbox" |
| }, |
| ] |
| traits_headers = [ "mailbox_mojom_traits.h" ] |
| traits_public_deps = [ "//gpu" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.MailboxHolder" |
| cpp = "::gpu::MailboxHolder" |
| }, |
| ] |
| traits_headers = [ "mailbox_holder_mojom_traits.h" ] |
| traits_public_deps = [ "//gpu" ] |
| }, |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.SyncToken" |
| cpp = "::gpu::SyncToken" |
| }, |
| ] |
| traits_headers = [ "sync_token_mojom_traits.h" ] |
| traits_public_deps = [ "//gpu" ] |
| }, |
| ] |
| |
| if (is_win) { |
| cpp_typemaps += [ |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.Luid" |
| cpp = "::CHROME_LUID" |
| }, |
| ] |
| traits_headers = [ "luid_mojom_traits.h" ] |
| traits_sources = [ "luid_mojom_traits.cc" ] |
| traits_public_deps = [ |
| ":mojom_traits", |
| "//gpu/config:config_sources", |
| ] |
| }, |
| ] |
| blink_cpp_typemaps += [ |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.Luid" |
| cpp = "::CHROME_LUID" |
| }, |
| ] |
| traits_headers = [ "luid_mojom_traits.h" ] |
| traits_public_deps = [ "//gpu" ] |
| }, |
| ] |
| } |
| |
| cpp_proxy_target = ":common" |
| export_class_attribute = "GPU_EXPORT" |
| export_header = "gpu/gpu_export.h" |
| cpp_configs = [ "//gpu:gpu_implementation" ] |
| |
| export_class_attribute_blink = "BLINK_PLATFORM_EXPORT" |
| export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" |
| export_header_blink = "third_party/blink/public/platform/web_common.h" |
| |
| # Because we use the export helpers above, our shared C++ sources target will |
| # be a component. This gives it a globally unique library name. |
| component_output_prefix = "gpu_common_interfaces" |
| } |
| |
| mojom("gpu_preferences_interface") { |
| generate_java = true |
| sources = [ "gpu_preferences.mojom" ] |
| |
| public_deps = [ |
| "//mojo/public/mojom/base", |
| "//ui/gfx/mojom", |
| ] |
| |
| enabled_features = [] |
| if (use_ozone) { |
| enabled_features += [ "use_ozone" ] |
| } |
| |
| cpp_typemaps = [ |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.GpuPreferences" |
| cpp = "::gpu::GpuPreferences" |
| }, |
| ] |
| traits_headers = [ "gpu_preferences_mojom_traits.h" ] |
| traits_public_deps = [ "//media:media_buildflags" ] |
| if (use_ozone) { |
| traits_public_deps += [ "//ui/base:features" ] |
| } |
| traits_deps = [ |
| # We depend on gpu_preferences but since it also depends on its own |
| # mojo bindings, that is handled with an |allowed_circular_includes| |
| # in //gpu/config:gpu_preferences. |
| # "//gpu/config:gpu_preferences", |
| ] |
| }, |
| ] |
| } |
| |
| mojom("vulkan_interface") { |
| generate_java = true |
| |
| # TODO(crbug.com/1062364): This interface code is used by some javascript |
| # targets even when vulkan isn't enabled, but the C++ fuzzer code will fail |
| # to compile if the headers aren't available. |
| if (!enable_vulkan) { |
| enable_mojolpm_fuzzing = false |
| } |
| |
| sources = [ |
| "vulkan_info.mojom", |
| "vulkan_types.mojom", |
| ] |
| |
| public_deps = [ "//mojo/public/mojom/base" ] |
| |
| js_generate_struct_deserializers = true |
| |
| # This imports the |generated_vulkan_type_mappings| definition used below. |
| import("//gpu/ipc/common/generated_vulkan_type_mappings.gni") |
| cpp_typemaps = [ |
| { |
| types = [ |
| { |
| mojom = "gpu.mojom.VulkanPhysicalDeviceInfo" |
| cpp = "::gpu::VulkanPhysicalDeviceInfo" |
| }, |
| { |
| mojom = "gpu.mojom.VulkanInfo" |
| cpp = "::gpu::VulkanInfo" |
| }, |
| ] |
| traits_headers = [ "vulkan_info_mojom_traits.h" ] |
| }, |
| { |
| types = generated_vulkan_type_mappings |
| traits_sources = [ "vulkan_types_mojom_traits.cc" ] |
| traits_headers = [ "vulkan_types_mojom_traits.h" ] |
| traits_public_deps = [ ":vulkan_types" ] |
| }, |
| ] |
| |
| export_class_attribute = "GPU_EXPORT" |
| export_header = "gpu/gpu_export.h" |
| cpp_configs = [ "//gpu:gpu_implementation" ] |
| |
| webui_module_path = "/" |
| } |
| |
| mojom("test_interfaces") { |
| testonly = true |
| sources = [ "traits_test_service.mojom" ] |
| |
| public_deps = [ |
| ":gpu_preferences_interface", |
| ":interfaces", |
| ] |
| |
| if (enable_vulkan) { |
| public_deps += [ ":vulkan_interface" ] |
| } |
| } |
| |
| source_set("mojom_traits") { |
| # External dependents on these traits should depend on //gpu/ipc/common. |
| visibility = [ ":*" ] |
| |
| sources = [ |
| "context_result_mojom_traits.h", |
| "gpu_peak_memory_mojom_traits.h", |
| "mailbox_holder_mojom_traits.h", |
| "mailbox_mojom_traits.cc", |
| "mailbox_mojom_traits.h", |
| "memory_stats_mojom_traits.h", |
| "surface_handle_mojom_traits.h", |
| "sync_token_mojom_traits.h", |
| ] |
| public_deps = [ |
| ":gpu_peak_memory", |
| ":interfaces_shared", |
| ":memory_stats_sources", |
| ":surface_handle_type", |
| ":vulkan_ycbcr_info", |
| "//gpu/command_buffer/common:common_base_sources", |
| "//mojo/public/cpp/bindings:bindings", |
| ] |
| if (is_android) { |
| sources += [ "vulkan_ycbcr_info_mojom_traits.h" ] |
| } |
| configs += [ "//gpu:gpu_implementation" ] |
| } |
| |
| source_set("test_support") { |
| testonly = true |
| sources = [ |
| "mock_command_buffer.cc", |
| "mock_command_buffer.h", |
| "mock_gpu_channel.cc", |
| "mock_gpu_channel.h", |
| ] |
| public_deps = [ |
| ":common", |
| "//testing/gmock", |
| ] |
| } |