#include "ui/ozone/platform/wayland/gpu/gbm_pixmap_wayland.h"
#include <drm_fourcc.h>
#include <gbm.h>
#include <xf86drmMode.h>
#include <memory>
#include "base/files/platform_file.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
#include "base/trace_event/trace_event.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/buffer_usage_util.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/linux/drm_util_linux.h"
#include "ui/gfx/linux/gbm_defines.h"
#include "ui/gfx/linux/gbm_device.h"
#include "ui/gfx/linux/gbm_util.h"
#include "ui/gfx/native_pixmap_handle.h"
#include "ui/ozone/platform/wayland/gpu/gbm_surfaceless_wayland.h"
#include "ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.h"
#include "ui/ozone/public/ozone_platform.h"
namespace ui {
GbmPixmapWayland::GbmPixmapWayland(WaylandBufferManagerGpu* buffer_manager)
: … { … }
GbmPixmapWayland::~GbmPixmapWayland() { … }
bool GbmPixmapWayland::InitializeBuffer(
gfx::AcceleratedWidget widget,
gfx::Size size,
gfx::BufferFormat format,
gfx::BufferUsage usage,
std::optional<gfx::Size> visible_area_size) { … }
bool GbmPixmapWayland::InitializeBufferFromHandle(
gfx::AcceleratedWidget widget,
gfx::Size size,
gfx::BufferFormat format,
gfx::NativePixmapHandle handle) { … }
bool GbmPixmapWayland::AreDmaBufFdsValid() const { … }
int GbmPixmapWayland::GetDmaBufFd(size_t plane) const { … }
uint32_t GbmPixmapWayland::GetDmaBufPitch(size_t plane) const { … }
size_t GbmPixmapWayland::GetDmaBufOffset(size_t plane) const { … }
size_t GbmPixmapWayland::GetDmaBufPlaneSize(size_t plane) const { … }
size_t GbmPixmapWayland::GetNumberOfPlanes() const { … }
bool GbmPixmapWayland::SupportsZeroCopyWebGPUImport() const { … }
uint64_t GbmPixmapWayland::GetBufferFormatModifier() const { … }
gfx::BufferFormat GbmPixmapWayland::GetBufferFormat() const { … }
gfx::Size GbmPixmapWayland::GetBufferSize() const { … }
uint32_t GbmPixmapWayland::GetUniqueId() const { … }
bool GbmPixmapWayland::ScheduleOverlayPlane(
gfx::AcceleratedWidget widget,
const gfx::OverlayPlaneData& overlay_plane_data,
std::vector<gfx::GpuFence> acquire_fences,
std::vector<gfx::GpuFence> release_fences) { … }
gfx::NativePixmapHandle GbmPixmapWayland::ExportHandle() const { … }
void GbmPixmapWayland::CreateDmabufBasedWlBuffer() { … }
}