| // gpu/ipc/common/shared_image_capabilities.mojom-shared.h is auto generated by mojom_bindings_generator.py, do not edit |
| |
| // 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. |
| |
| #ifndef GPU_IPC_COMMON_SHARED_IMAGE_CAPABILITIES_MOJOM_SHARED_H_ |
| #define GPU_IPC_COMMON_SHARED_IMAGE_CAPABILITIES_MOJOM_SHARED_H_ |
| |
| #include <stdint.h> |
| |
| #include <functional> |
| #include <iosfwd> |
| #include <type_traits> |
| #include <utility> |
| #include "mojo/public/cpp/bindings/array_data_view.h" |
| #include "mojo/public/cpp/bindings/enum_traits.h" |
| #include "mojo/public/cpp/bindings/interface_data_view.h" |
| #include "mojo/public/cpp/bindings/lib/bindings_internal.h" |
| #include "mojo/public/cpp/bindings/lib/serialization.h" |
| #include "mojo/public/cpp/bindings/map_data_view.h" |
| #include "mojo/public/cpp/bindings/string_data_view.h" |
| |
| #include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h" |
| |
| #include "gpu/ipc/common/shared_image_capabilities.mojom-shared-internal.h" |
| |
| |
| |
| |
| #include "gpu/ipc/common/shared_image_capabilities.mojom-data-view.h" |
| #include "base/component_export.h" |
| |
| #ifdef KYTHE_IS_RUNNING |
| #pragma kythe_inline_metadata "Metadata comment" |
| #endif |
| |
| |
| namespace std { |
| |
| } // namespace std |
| |
| namespace mojo { |
| |
| |
| namespace internal { |
| |
| template <typename MaybeConstUserType> |
| struct Serializer<::gpu::mojom::SharedImageCapabilitiesDataView, MaybeConstUserType> { |
| using UserType = typename std::remove_const<MaybeConstUserType>::type; |
| using Traits = StructTraits<::gpu::mojom::SharedImageCapabilitiesDataView, UserType>; |
| |
| static void Serialize( |
| MaybeConstUserType& input, |
| mojo::internal::MessageFragment<::gpu::mojom::internal::SharedImageCapabilities_Data>& fragment) { |
| if (CallIsNullIfExists<Traits>(input)) |
| return; |
| fragment.Allocate(); |
| |
| fragment->supports_scanout_shared_images = Traits::supports_scanout_shared_images(input); |
| |
| fragment->supports_luminance_shared_images = Traits::supports_luminance_shared_images(input); |
| |
| fragment->supports_r16_shared_images = Traits::supports_r16_shared_images(input); |
| |
| fragment->supports_native_nv12_mappable_shared_images = Traits::supports_native_nv12_mappable_shared_images(input); |
| |
| fragment->is_r16f_supported = Traits::is_r16f_supported(input); |
| |
| fragment->disable_r8_shared_images = Traits::disable_r8_shared_images(input); |
| |
| fragment->disable_webgpu_shared_images = Traits::disable_webgpu_shared_images(input); |
| |
| fragment->disable_one_component_textures = Traits::disable_one_component_textures(input); |
| |
| fragment->shared_image_d3d = Traits::shared_image_d3d(input); |
| |
| fragment->shared_image_swap_chain = Traits::shared_image_swap_chain(input); |
| } |
| |
| static bool Deserialize(::gpu::mojom::internal::SharedImageCapabilities_Data* input, |
| UserType* output, |
| Message* message) { |
| if (!input) |
| return CallSetToNullIfExists<Traits>(output); |
| |
| ::gpu::mojom::SharedImageCapabilitiesDataView data_view(input, message); |
| return Traits::Read(data_view, output); |
| } |
| }; |
| |
| } // namespace internal |
| |
| } // namespace mojo |
| |
| |
| namespace gpu::mojom { |
| |
| |
| |
| |
| } // gpu::mojom |
| |
| // Declare TraceFormatTraits for enums, which should be defined in ::perfetto |
| // namespace. |
| |
| #endif // GPU_IPC_COMMON_SHARED_IMAGE_CAPABILITIES_MOJOM_SHARED_H_ |
| |
| /* Metadata comment |
| eyJ0eXBlIjogImt5dGhlMCIsICJtZXRhIjogW119 |
| */ |