summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxwindow.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index 45e565f24f..9b9576c88b 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -432,15 +432,27 @@ QQnxBuffer &QQnxWindow::renderBuffer()
// Get all buffers available for rendering
errno = 0;
screen_buffer_t buffers[MAX_BUFFER_COUNT];
- const int result = screen_get_window_property_pv(m_window, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)buffers);
+ int result = screen_get_window_property_pv(m_window, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)buffers);
if (result != 0)
qFatal("QQnxWindow: failed to query window buffers, errno=%d", errno);
- // Wrap each buffer
+ // Wrap each buffer and clear
for (int i = 0; i < MAX_BUFFER_COUNT; ++i) {
m_buffers[i] = QQnxBuffer(buffers[i]);
+
+ // Clear Buffer
+ errno = 0;
+ int bg[] = { SCREEN_BLIT_COLOR, 0x00000000, SCREEN_BLIT_END };
+ result = screen_fill(m_screen->nativeContext(), buffers[i], bg);
+ if (result != 0)
+ qFatal("QQnxWindow: failed to clear window buffer, errno=%d", errno);
}
+ errno = 0;
+ result = screen_flush_blits(m_screen->nativeContext(), 0);
+ if (result != 0)
+ qFatal("QQnxWindow: failed to flush blits, errno=%d", errno);
+
// Use the first available render buffer
m_currentBufferIndex = 0;
m_previousBufferIndex = -1;