13#if defined(QQNXRASTERWINDOW_DEBUG)
14#define qRasterWindowDebug qDebug
16#define qRasterWindowDebug QT_NO_QDEBUG_MACRO
23 m_currentBufferIndex(-1),
24 m_previousBufferIndex(-1)
32 const int val = SCREEN_USAGE_NATIVE | SCREEN_USAGE_READ | SCREEN_USAGE_WRITE;
35 qFatal(
"QQnxRasterWindow: failed to set window alpha usage, errno=%d", errno);
63 if (m_currentBufferIndex != -1 && !dirty.
isEmpty()) {
65 QQnxBuffer ¤tBuffer = m_buffers[m_currentBufferIndex];
80 "Failed to post window");
83 m_previousBufferIndex = m_currentBufferIndex++;
85 m_currentBufferIndex = 0;
88 m_previousDirty = dirty;
107 if (m_currentBufferIndex == -1) {
111 const int result = screen_get_window_property_pv(
nativeHandle(), SCREEN_PROPERTY_RENDER_BUFFERS,
120 int bg[] = { SCREEN_BLIT_COLOR, 0x00000000, SCREEN_BLIT_END };
122 "Failed to clear window buffer");
126 "Failed to flush blits");
129 m_currentBufferIndex = 0;
130 m_previousBufferIndex = -1;
133 return m_buffers[m_currentBufferIndex];
158 m_currentBufferIndex = -1;
168 if (m_previousBufferIndex == -1 || region.
isEmpty())
171 QQnxBuffer ¤tBuffer = m_buffers[m_currentBufferIndex];
172 QQnxBuffer &previousBuffer = m_buffers[m_previousBufferIndex];
175 for (
auto rit = region.
rbegin(), rend = region.
rend(); rit != rend; ++rit) {
184 SCREEN_BLIT_SOURCE_Y,
rect.y(),
185 SCREEN_BLIT_SOURCE_WIDTH,
rect.width(),
186 SCREEN_BLIT_SOURCE_HEIGHT,
rect.height(),
187 SCREEN_BLIT_DESTINATION_X,
rect.x() + dx,
188 SCREEN_BLIT_DESTINATION_Y,
rect.y() + dy,
189 SCREEN_BLIT_DESTINATION_WIDTH,
rect.width(),
190 SCREEN_BLIT_DESTINATION_HEIGHT,
rect.height(),
196 "Failed to blit buffers");
203 "Failed to flush blits");
screen_buffer_t nativeBuffer() const
void blitPreviousToCurrent(const QRegion ®ion, int dx, int dy, bool flush=false)
QQnxBuffer & renderBuffer()
void setParent(const QPlatformWindow *window) override
This function is called to enable native child window in QPA.
int pixelFormat() const override
void scroll(const QRegion ®ion, int dx, int dy, bool flush=false)
QQnxRasterWindow(QWindow *window, screen_context_t context, bool needRootWindow)
void resetBuffers() override
void post(const QRegion &dirty)
The QQnxWindow is the base class of the various classes used as instances of QPlatformWindow in the Q...
screen_context_t m_screenContext
void setParent(const QPlatformWindow *window) override
This function is called to enable native child window in QPA.
screen_window_t nativeHandle() const
void setBufferSize(const QSize &size)
QPlatformScreen * screen() const override
Returns the platform screen handle corresponding to this platform window, or null if the window is no...
\inmodule QtCore\reentrant
The QRegion class specifies a clip region for a painter.
QRect boundingRect() const noexcept
Returns the bounding rectangle of this region.
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
const_reverse_iterator rbegin() const noexcept
const_reverse_iterator rend() const noexcept
QSize size() const override
Returns the size of the window excluding any window frame.
Combined button and popup list for selecting options.
GLuint const GLuint * buffers
GLuint GLsizei const void GLenum preserve
#define Q_SCREEN_CRITICALERROR(x, message)
#define Q_SCREEN_CHECKERROR(x, message)
#define qRasterWindowDebug