#include <qbbbuffer.h>
Definition at line 51 of file qbbbuffer.h.
◆ QBBBuffer() [1/3]
Definition at line 54 of file qbbbuffer.cpp.
57 #if defined(QBBBUFFER_DEBUG) 58 qDebug() <<
"QBBBuffer::QBBBuffer - empty";
Q_CORE_EXPORT void qDebug(const char *,...)
◆ QBBBuffer() [2/3]
QBBBuffer::QBBBuffer |
( |
screen_buffer_t |
buffer | ) |
|
Definition at line 62 of file qbbbuffer.cpp.
65 #if defined(QBBBUFFER_DEBUG) 66 qDebug() <<
"QBBBuffer::QBBBuffer - normal";
72 int result = screen_get_buffer_property_iv(buffer, SCREEN_PROPERTY_BUFFER_SIZE, size);
74 qFatal(
"QBB: failed to query buffer size, errno=%d",
errno);
80 result = screen_get_buffer_property_iv(buffer, SCREEN_PROPERTY_STRIDE, &stride);
82 qFatal(
"QBB: failed to query buffer stride, errno=%d",
errno);
87 uchar* dataPtr = NULL;
88 result = screen_get_buffer_property_pv(buffer, SCREEN_PROPERTY_POINTER, (
void **)&dataPtr);
90 qFatal(
"QBB: failed to query buffer pointer, errno=%d",
errno);
92 if (dataPtr == NULL) {
93 qFatal(
"QBB: buffer pointer is NULL, errno=%d",
errno);
99 result = screen_get_buffer_property_iv(buffer, SCREEN_PROPERTY_FORMAT, &screenFormat);
101 qFatal(
"QBB: failed to query buffer format, errno=%d",
errno);
106 switch (screenFormat) {
107 case SCREEN_FORMAT_RGBX4444:
110 case SCREEN_FORMAT_RGBA4444:
113 case SCREEN_FORMAT_RGBX5551:
116 case SCREEN_FORMAT_RGB565:
119 case SCREEN_FORMAT_RGBX8888:
122 case SCREEN_FORMAT_RGBA8888:
126 qFatal(
"QBB: unsupported buffer format, format=%d", screenFormat);
130 mImage =
QImage(dataPtr, size[0], size[1], stride, imageFormat);
Format
The following image formats are available in Qt.
Q_CORE_EXPORT void qDebug(const char *,...)
The QImage class provides a hardware-independent image representation that allows direct access to th...
Q_CORE_EXPORT void qFatal(const char *,...)
◆ QBBBuffer() [3/3]
QBBBuffer::QBBBuffer |
( |
const QBBBuffer & |
other | ) |
|
Definition at line 133 of file qbbbuffer.cpp.
137 #if defined(QBBBUFFER_DEBUG) 138 qDebug() <<
"QBBBuffer::QBBBuffer - copy";
Q_CORE_EXPORT void qDebug(const char *,...)
◆ ~QBBBuffer()
QBBBuffer::~QBBBuffer |
( |
| ) |
|
|
virtual |
Definition at line 142 of file qbbbuffer.cpp.
144 #if defined(QBBBUFFER_DEBUG) 145 qDebug() <<
"QBBBuffer::~QBBBuffer";
Q_CORE_EXPORT void qDebug(const char *,...)
◆ image() [1/2]
const QImage* QBBBuffer::image |
( |
| ) |
const |
|
inline |
◆ image() [2/2]
◆ invalidateInCache()
void QBBBuffer::invalidateInCache |
( |
| ) |
|
Definition at line 149 of file qbbbuffer.cpp.
Referenced by QBBWindow::copyBack(), and rect().
151 #if defined(QBBBUFFER_DEBUG) 152 qDebug() <<
"QBBBuffer::invalidateInCache";
157 qFatal(
"QBB: can't invalidate cache for null buffer");
164 qFatal(
"QBB: failed to invalidate cache, errno=%d",
errno);
int bytesPerLine() const
Returns the number of bytes per image scanline.
Q_CORE_EXPORT void qDebug(const char *,...)
uchar * bits()
Returns a pointer to the first pixel data.
Q_CORE_EXPORT void qFatal(const char *,...)
int height() const
Returns the height of the image.
◆ nativeBuffer()
screen_buffer_t QBBBuffer::nativeBuffer |
( |
| ) |
const |
|
inline |
◆ rect()
QRect QBBBuffer::rect |
( |
| ) |
const |
|
inline |
◆ mBuffer
screen_buffer_t QBBBuffer::mBuffer |
|
private |
◆ mImage
The documentation for this class was generated from the following files: