chromium/ui/ozone/platform/wayland/host/wayland_zwp_linux_dmabuf.h

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_ZWP_LINUX_DMABUF_H_
#define UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_ZWP_LINUX_DMABUF_H_

#include <optional>
#include <vector>

#include "base/files/scoped_file.h"
#include "base/memory/raw_ptr.h"
#include "ui/ozone/platform/wayland/common/wayland_object.h"
#include "ui/ozone/platform/wayland/common/wayland_util.h"

struct zwp_linux_dmabuf_v1;
struct zwp_linux_buffer_params_v1;

namespace gfx {
enum class BufferFormat : uint8_t;
class Size;
}  // namespace gfx

namespace ui {

class WaylandConnection;

// Wrapper around |zwp_linux_dmabuf_v1| Wayland factory, which creates
// |wl_buffer|s backed by dmabuf prime file descriptor.
class WaylandZwpLinuxDmabuf
    : public wl::GlobalObjectRegistrar<WaylandZwpLinuxDmabuf> {};

}  // namespace ui

#endif  // UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_ZWP_LINUX_DMABUF_H_