#ifdef UNSAFE_BUFFERS_BUILD
#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 …
#define DRM_FORMAT_INVALID …
EGLint FourCC(gfx::BufferFormat format) { … }
}
NativePixmapEGLBinding::NativePixmapEGLBinding(const gfx::Size& size,
gfx::BufferFormat format,
gfx::BufferPlane plane)
: … { … }
NativePixmapEGLBinding::~NativePixmapEGLBinding() { … }
bool NativePixmapEGLBinding::IsBufferFormatSupported(gfx::BufferFormat format) { … }
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) { … }
}