blob: 78a5c1c080053f35fdae6cb04941a48d876b4d55 [file] [log] [blame]
// gpu/ipc/common/surface_handle.mojom-data-view.h is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2025 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_DATA_VIEW_H_
#define GPU_IPC_COMMON_SURFACE_HANDLE_MOJOM_DATA_VIEW_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/map_data_view.h"
#include "mojo/public/cpp/bindings/string_data_view.h"
#include "gpu/ipc/common/surface_handle.mojom-shared-internal.h"
namespace gpu::mojom {
class SurfaceHandleDataView;
} // gpu::mojom
namespace mojo {
namespace internal {
template <>
struct MojomTypeTraits<::gpu::mojom::SurfaceHandleDataView> {
using Data = ::gpu::mojom::internal::SurfaceHandle_Data;
using DataAsArrayElement = Pointer<Data>;
static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};
} // namespace internal
} // namespace mojo
namespace gpu::mojom {
class SurfaceHandleDataView {
public:
SurfaceHandleDataView() = default;
SurfaceHandleDataView(
internal::SurfaceHandle_Data* data,
mojo::Message* message)
: data_(data) {}
bool is_null() const { return !data_; }
uint64_t surface_handle() const {
return data_->surface_handle;
}
private:
internal::SurfaceHandle_Data* data_ = nullptr;
};
} // gpu::mojom
#endif // GPU_IPC_COMMON_SURFACE_HANDLE_MOJOM_DATA_VIEW_H_