chromium/ui/ozone/platform/wayland/host/wayland_drm.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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include <wayland-drm-client-protocol.h>

#include <fcntl.h>
#include <xf86drm.h>

#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "ui/gfx/buffer_format_util.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"
#include "ui/ozone/platform/wayland/host/wayland_drm.h"
#include "wayland-util.h"

namespace ui {

namespace {
constexpr uint32_t kMinVersion =;
}

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

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

WaylandDrm::WaylandDrm(wl_drm* drm, WaylandConnection* connection)
    :{}

WaylandDrm::~WaylandDrm() = default;

bool WaylandDrm::SupportsDrmPrime() const {}

void WaylandDrm::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 WaylandDrm::CanCreateBufferImmed() const {}

void WaylandDrm::HandleDrmFailure(const std::string& error) {}

void WaylandDrm::AddSupportedFourCCFormat(uint32_t fourcc_format) {}

void WaylandDrm::Authenticate(const char* drm_device_path) {}

void WaylandDrm::DrmDeviceAuthenticated(wl_drm* drm) {}

void WaylandDrm::HandleCapabilities(uint32_t value) {}

// static
void WaylandDrm::OnDevice(void* data, wl_drm* drm, const char* path) {}

// static
void WaylandDrm::OnFormat(void* data, wl_drm* drm, uint32_t format) {}

// static
void WaylandDrm::OnAuthenticated(void* data, wl_drm* drm) {}

// static
void WaylandDrm::OnCapabilities(void* data, wl_drm* drm, uint32_t value) {}

}  // namespace ui