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

// 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.

#include "ui/ozone/platform/wayland/host/wayland_zwp_linux_dmabuf.h"

#include <drm_fourcc.h>
#include <linux-dmabuf-unstable-v1-client-protocol.h>

#include "base/logging.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"
#include "ui/gfx/linux/drm_util_linux.h"
#include "ui/ozone/platform/wayland/host/wayland_buffer_factory.h"
#include "ui/ozone/platform/wayland/host/wayland_connection.h"

namespace ui {

namespace {
constexpr uint32_t kMinVersion =;
constexpr uint32_t kMaxVersion =;
}  // namespace

// static
constexpr char WaylandZwpLinuxDmabuf::kInterfaceName[];

// static
void WaylandZwpLinuxDmabuf::Instantiate(WaylandConnection* connection,
                                        wl_registry* registry,
                                        uint32_t name,
                                        const std::string& interface,
                                        uint32_t version) {}

WaylandZwpLinuxDmabuf::WaylandZwpLinuxDmabuf(
    zwp_linux_dmabuf_v1* zwp_linux_dmabuf,
    WaylandConnection* connection)
    :{}

WaylandZwpLinuxDmabuf::~WaylandZwpLinuxDmabuf() = default;

void WaylandZwpLinuxDmabuf::CreateBuffer(const base::ScopedFD& fd,
                                         const gfx::Size& size,
                                         const std::vector<uint32_t>& strides,
                                         const std::vector<uint32_t>& offsets,
                                         const std::vector<uint64_t>& modifiers,
                                         uint32_t format,
                                         uint32_t planes_count,
                                         wl::OnRequestBufferCallback callback) {}

bool WaylandZwpLinuxDmabuf::CanCreateBufferImmed() const {}

void WaylandZwpLinuxDmabuf::AddSupportedFourCCFormatAndModifier(
    uint32_t fourcc_format,
    std::optional<uint64_t> modifier) {}

void WaylandZwpLinuxDmabuf::NotifyRequestCreateBufferDone(
    zwp_linux_buffer_params_v1* params,
    wl_buffer* new_buffer) {}

// static
void WaylandZwpLinuxDmabuf::OnModifiers(void* data,
                                        zwp_linux_dmabuf_v1* linux_dmabuf,
                                        uint32_t format,
                                        uint32_t modifier_hi,
                                        uint32_t modifier_lo) {}

// static
void WaylandZwpLinuxDmabuf::OnFormat(void* data,
                                     zwp_linux_dmabuf_v1* linux_dmabuf,
                                     uint32_t format) {}

// static
void WaylandZwpLinuxDmabuf::OnCreated(void* data,
                                      zwp_linux_buffer_params_v1* params,
                                      wl_buffer* new_buffer) {}

// static
void WaylandZwpLinuxDmabuf::OnFailed(void* data,
                                     zwp_linux_buffer_params_v1* params) {}

}  // namespace ui