#include "ui/gfx/mojom/gpu_fence_handle_mojom_traits.h"
#include "build/build_config.h"
#include "mojo/public/cpp/system/platform_handle.h"
namespace mojo {
#if BUILDFLAG(IS_POSIX)
mojo::PlatformHandle
StructTraits<gfx::mojom::GpuFenceHandleDataView,
gfx::GpuFenceHandle>::native_fd(gfx::GpuFenceHandle& handle) { … }
#elif BUILDFLAG(IS_WIN)
mojo::PlatformHandle
StructTraits<gfx::mojom::GpuFenceHandleDataView,
gfx::GpuFenceHandle>::native_handle(gfx::GpuFenceHandle& handle) {
return mojo::PlatformHandle(handle.Release());
}
#endif
bool StructTraits<gfx::mojom::GpuFenceHandleDataView, gfx::GpuFenceHandle>::
Read(gfx::mojom::GpuFenceHandleDataView data, gfx::GpuFenceHandle* out) { … }
void StructTraits<gfx::mojom::GpuFenceHandleDataView,
gfx::GpuFenceHandle>::SetToNull(gfx::GpuFenceHandle* handle) { … }
bool StructTraits<gfx::mojom::GpuFenceHandleDataView,
gfx::GpuFenceHandle>::IsNull(const gfx::GpuFenceHandle&
handle) { … }
}