| // gpu/ipc/common/surface_handle.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_SURFACE_HANDLE_MOJOM_SHARED_H_ |
| #define GPU_IPC_COMMON_SURFACE_HANDLE_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/surface_handle.mojom-shared-internal.h" |
| |
| |
| |
| |
| #include "gpu/ipc/common/surface_handle.mojom-data-view.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::SurfaceHandleDataView, MaybeConstUserType> { |
| using UserType = typename std::remove_const<MaybeConstUserType>::type; |
| using Traits = StructTraits<::gpu::mojom::SurfaceHandleDataView, UserType>; |
| |
| static void Serialize( |
| MaybeConstUserType& input, |
| mojo::internal::MessageFragment<::gpu::mojom::internal::SurfaceHandle_Data>& fragment) { |
| if (CallIsNullIfExists<Traits>(input)) |
| return; |
| fragment.Allocate(); |
| |
| fragment->surface_handle = Traits::surface_handle(input); |
| } |
| |
| static bool Deserialize(::gpu::mojom::internal::SurfaceHandle_Data* input, |
| UserType* output, |
| Message* message) { |
| if (!input) |
| return CallSetToNullIfExists<Traits>(output); |
| |
| ::gpu::mojom::SurfaceHandleDataView 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_SURFACE_HANDLE_MOJOM_SHARED_H_ |
| |
| /* Metadata comment |
| eyJ0eXBlIjogImt5dGhlMCIsICJtZXRhIjogW119 |
| */ |