chromium/ui/ozone/common/native_pixmap_egl_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.

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

#include "ui/ozone/common/native_pixmap_egl_binding.h"

#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "base/notreached.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_surface_egl.h"
#include "ui/gl/scoped_binders.h"

namespace ui {

namespace {

#define FOURCC(a, b, c, d)

#define DRM_FORMAT_R8
#define DRM_FORMAT_R16
#define DRM_FORMAT_GR88
#define DRM_FORMAT_GR1616
#define DRM_FORMAT_RGB565
#define DRM_FORMAT_ARGB8888
#define DRM_FORMAT_ABGR8888
#define DRM_FORMAT_XRGB8888
#define DRM_FORMAT_XBGR8888
#define DRM_FORMAT_ABGR2101010
#define DRM_FORMAT_ARGB2101010
#define DRM_FORMAT_ABGR16161616F
#define DRM_FORMAT_YVU420
#define DRM_FORMAT_NV12
#define DRM_FORMAT_P010
/* Reserve 0 for the invalid format specifier */
#define DRM_FORMAT_INVALID

EGLint FourCC(gfx::BufferFormat format) {}

}  // namespace

NativePixmapEGLBinding::NativePixmapEGLBinding(const gfx::Size& size,
                                               gfx::BufferFormat format,
                                               gfx::BufferPlane plane)
    :{}

NativePixmapEGLBinding::~NativePixmapEGLBinding() {}

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

// static
std::unique_ptr<NativePixmapGLBinding> NativePixmapEGLBinding::Create(
    scoped_refptr<gfx::NativePixmap> pixmap,
    gfx::BufferFormat plane_format,
    gfx::BufferPlane plane,
    gfx::Size plane_size,
    const gfx::ColorSpace& color_space,
    GLenum target,
    GLuint texture_id) {}

bool NativePixmapEGLBinding::InitializeFromNativePixmap(
    scoped_refptr<gfx::NativePixmap> pixmap,
    const gfx::ColorSpace& color_space,
    GLenum target,
    GLuint texture_id) {}

}  // namespace ui