chromium/ui/ozone/platform/x11/native_pixmap_egl_x11_binding.cc

// Copyright 2022 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/x11/native_pixmap_egl_x11_binding.h"

#include <GL/gl.h>

#include <unistd.h>

#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "base/posix/eintr_wrapper.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/linux/native_pixmap_dmabuf.h"
#include "ui/gfx/x/connection.h"
#include "ui/gfx/x/dri3.h"
#include "ui/gfx/x/future.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/scoped_binders.h"

namespace gl {

namespace {
bool IsFormatSupported(gfx::BufferFormat format) {}

uint8_t Depth(gfx::BufferFormat format) {}

uint8_t Bpp(gfx::BufferFormat format) {}

x11::Pixmap XPixmapFromNativePixmap(const gfx::NativePixmap& native_pixmap,
                                    gfx::BufferFormat buffer_format) {}

inline EGLDisplay FromXDisplay() {}

}  // namespace

}  // namespace gl

namespace ui {

NativePixmapEGLX11Binding::NativePixmapEGLX11Binding(gfx::BufferFormat format)
    :{}

NativePixmapEGLX11Binding::~NativePixmapEGLX11Binding() {}

bool NativePixmapEGLX11Binding::IsBufferFormatSupported(
    gfx::BufferFormat format) {}

bool NativePixmapEGLX11Binding::Initialize(x11::Pixmap pixmap) {}

// static
std::unique_ptr<NativePixmapGLBinding> NativePixmapEGLX11Binding::Create(
    scoped_refptr<gfx::NativePixmap> native_pixmap,
    gfx::BufferFormat plane_format,
    gfx::Size plane_size,
    GLenum target,
    GLuint texture_id) {}

// static
bool NativePixmapEGLX11Binding::CanImportNativeGLXPixmap() {}

bool NativePixmapEGLX11Binding::BindTexture(GLenum target, GLuint texture_id) {}

}  // namespace ui