summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-04-25 14:22:13 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2017-09-04 11:36:50 +0000
commit3f1ac5899476307923686166705812c24a2e3578 (patch)
treeeaeb3d40be3d97e9161977a31825f13f07293d0c /src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
parentfefdb8466265d632675c50c53a027a86ca1af4a2 (diff)
Add QPlatformSurface::screen() const
Classes inheriting QPlatformSurface need to return the QPlatformScreen to allow the platform integration plugin to know information about the used screen by the surface. QPlatformSurface and QPlatformWindow had the same function defined, but it was not possible to call it without casting the QPlatformSurface pointer. Change-Id: I1f93fe7c13ebbc51769677038edeca4de5db0024 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
index a758bdf7f4..dd7f907ee0 100644
--- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
+++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
@@ -139,6 +139,7 @@ void QQnxRasterBackingStore::beginPaint(const QRegion &region)
platformWindow()->adjustBufferSize();
if (window()->requestedFormat().alphaBufferSize() > 0) {
+ auto platformScreen = static_cast<QQnxScreen *>(platformWindow()->screen());
for (const QRect &r : region) {
// Clear transparent regions
const int bg[] = {
@@ -149,11 +150,11 @@ void QQnxRasterBackingStore::beginPaint(const QRegion &region)
SCREEN_BLIT_DESTINATION_HEIGHT, r.height(),
SCREEN_BLIT_END
};
- Q_SCREEN_CHECKERROR(screen_fill(platformWindow()->screen()->nativeContext(),
+ Q_SCREEN_CHECKERROR(screen_fill(platformScreen->nativeContext(),
platformWindow()->renderBuffer().nativeBuffer(), bg),
"failed to clear transparent regions");
}
- Q_SCREEN_CHECKERROR(screen_flush_blits(platformWindow()->screen()->nativeContext(),
+ Q_SCREEN_CHECKERROR(screen_flush_blits(platformScreen->nativeContext(),
SCREEN_WAIT_IDLE), "failed to flush blits");
}
}