17 m_currentBufferIndex(-1),
18 m_previousBufferIndex(-1)
26 const int val = SCREEN_USAGE_NATIVE | SCREEN_USAGE_READ | SCREEN_USAGE_WRITE;
29 qFatal(
"QQnxRasterWindow: failed to set window alpha usage, errno=%d", errno);
57 if (m_currentBufferIndex != -1 && !dirty.
isEmpty()) {
59 QQnxBuffer ¤tBuffer = m_buffers[m_currentBufferIndex];
74 "Failed to post window");
77 m_previousBufferIndex = m_currentBufferIndex++;
79 m_currentBufferIndex = 0;
82 m_previousDirty = dirty;
101 if (m_currentBufferIndex == -1) {
105 const int result = screen_get_window_property_pv(
nativeHandle(), SCREEN_PROPERTY_RENDER_BUFFERS,
114 int bg[] = { SCREEN_BLIT_COLOR, 0x00000000, SCREEN_BLIT_END };
116 "Failed to clear window buffer");
120 "Failed to flush blits");
123 m_currentBufferIndex = 0;
124 m_previousBufferIndex = -1;
127 return m_buffers[m_currentBufferIndex];
152 m_currentBufferIndex = -1;
162 if (m_previousBufferIndex == -1 || region.
isEmpty())
165 QQnxBuffer ¤tBuffer = m_buffers[m_currentBufferIndex];
166 QQnxBuffer &previousBuffer = m_buffers[m_previousBufferIndex];
169 for (
auto rit = region.
rbegin(), rend = region.
rend(); rit != rend; ++rit) {
178 SCREEN_BLIT_SOURCE_Y,
rect.y(),
179 SCREEN_BLIT_SOURCE_WIDTH,
rect.width(),
180 SCREEN_BLIT_SOURCE_HEIGHT,
rect.height(),
181 SCREEN_BLIT_DESTINATION_X,
rect.x() + dx,
182 SCREEN_BLIT_DESTINATION_Y,
rect.y() + dy,
183 SCREEN_BLIT_DESTINATION_WIDTH,
rect.width(),
184 SCREEN_BLIT_DESTINATION_HEIGHT,
rect.height(),
189 previousBuffer.nativeBuffer(),
attribs),
190 "Failed to blit buffers");
197 "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
QRect intersected(const QRect &other) const noexcept
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
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.
#define qCDebug(category,...)
GLuint const GLuint * buffers
GLuint GLsizei const void GLenum preserve
#define Q_SCREEN_CRITICALERROR(x, message)
#define Q_SCREEN_CHECKERROR(x, message)