8#include <QtCore/QDebug>
13#if defined(QQNXBUFFER_DEBUG)
14#define qBufferDebug qDebug
16#define qBufferDebug QT_NO_QDEBUG_MACRO
35 "Failed to query buffer size");
40 "Failed to query buffer stride");
44 uchar *dataPtr =
nullptr;
46 screen_get_buffer_property_pv(
buffer, SCREEN_PROPERTY_POINTER, (
void **)&dataPtr),
47 "Failed to query buffer pointer");
50 qFatal(
"QQNX: buffer pointer is NULL, errno=%d", errno);
55 screen_get_buffer_property_iv(
buffer, SCREEN_PROPERTY_FORMAT, &screenFormat),
56 "Failed to query buffer format");
60 switch (screenFormat) {
61 case SCREEN_FORMAT_RGBX4444:
64 case SCREEN_FORMAT_RGBA4444:
67 case SCREEN_FORMAT_RGBX5551:
70 case SCREEN_FORMAT_RGB565:
73 case SCREEN_FORMAT_RGBX8888:
76 case SCREEN_FORMAT_RGBA8888:
80 qFatal(
"QQNX: unsupported buffer format, format=%d", screenFormat);
88 : m_buffer(
other.m_buffer),
89 m_image(
other.m_image)
105 qFatal(
"QQNX: can't invalidate cache for null buffer");
111 qFatal(
"QQNX: failed to invalidate cache, errno=%d", errno);
qsizetype bytesPerLine() const
Returns the number of bytes per image scanline.
uchar * bits()
Returns a pointer to the first pixel data.
int height() const
Returns the height of the image.
Format
The following image formats are available in Qt.
@ Format_ARGB32_Premultiplied
@ Format_ARGB4444_Premultiplied
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
const void GLsizei GLsizei stride
#define Q_SCREEN_CRITICALERROR(x, message)
#define Q_SCREEN_CHECKERROR(x, message)