Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
linuxdmabufclientbufferintegration.cpp File Reference

(e0087a1347b690d4360dba4455764ac1a778d9c8)

#include "linuxdmabufclientbufferintegration.h"
#include "linuxdmabuf.h"
#include <QtWaylandCompositor/QWaylandCompositor>
#include <QtWaylandCompositor/private/qwayland-server-wayland.h>
#include <QtWaylandCompositor/private/qwltextureorphanage_p.h>
#include <qpa/qplatformnativeinterface.h>
#include <QtOpenGL/QOpenGLTexture>
#include <QtCore/QVarLengthArray>
#include <QtGui/QGuiApplication>
#include <QtGui/QOpenGLContext>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <unistd.h>
#include <drm_fourcc.h>
Include dependency graph for linuxdmabufclientbufferintegration.cpp:

Go to the source code of this file.

Macros

#define ADD_PLANE_ATTRIBS(plane_idx)

Functions

static QT_BEGIN_NAMESPACE QWaylandBufferRef::BufferFormatEgl formatFromDrmFormat (EGLint format)
static QOpenGLTexture::TextureFormat openGLFormatFromBufferFormat (QWaylandBufferRef::BufferFormatEgl format)

Macro Definition Documentation

◆ ADD_PLANE_ATTRIBS

#define ADD_PLANE_ATTRIBS ( plane_idx)
Value:
{ \
attribs.append(EGL_DMA_BUF_PLANE ## plane_idx ## _FD_EXT); \
attribs.append(dmabufBuffer->plane(plane_idx).fd); \
attribs.append(EGL_DMA_BUF_PLANE ## plane_idx ## _OFFSET_EXT); \
attribs.append(EGLint(dmabufBuffer->plane(plane_idx).offset)); \
attribs.append(EGL_DMA_BUF_PLANE ## plane_idx ## _PITCH_EXT); \
attribs.append(EGLint(dmabufBuffer->plane(plane_idx).stride)); \
if (dmabufBuffer->plane(plane_idx).modifiers != DRM_FORMAT_MOD_INVALID) { \
attribs.append(EGL_DMA_BUF_PLANE ## plane_idx ## _MODIFIER_LO_EXT); \
attribs.append(EGLint(dmabufBuffer->plane(plane_idx).modifiers & 0xffffffff)); \
attribs.append(EGL_DMA_BUF_PLANE ## plane_idx ## _MODIFIER_HI_EXT); \
attribs.append(EGLint(dmabufBuffer->plane(plane_idx).modifiers >> 32)); \
} \
}
#define DRM_FORMAT_MOD_INVALID
Definition linuxdmabuf.h:36
const GLint * attribs

Function Documentation

◆ formatFromDrmFormat()

QT_BEGIN_NAMESPACE QWaylandBufferRef::BufferFormatEgl formatFromDrmFormat ( EGLint format)
static

Definition at line 23 of file linuxdmabufclientbufferintegration.cpp.

◆ openGLFormatFromBufferFormat()

QOpenGLTexture::TextureFormat openGLFormatFromBufferFormat ( QWaylandBufferRef::BufferFormatEgl format)
static

Definition at line 73 of file linuxdmabufclientbufferintegration.cpp.