diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-08-09 11:53:01 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-08-10 09:05:03 +0000 |
commit | e9fe0a15a8ede45020def7059ed4f49a5c20186d (patch) | |
tree | c1ea31841210b76c5a8bfd5dbeb1a4bda0161fb2 /src/plugins/platforms/eglfs/deviceintegration | |
parent | 9ab5c329bfe17122441000f0c8cdd1f32f09072b (diff) |
eglfs: Fix rotation support with the DRM backends
The change in QEglFSScreen::geometry() was not reflected in the
advanced backends that subclass it.
Change-Id: I6494a96f0b9afaea3722c61035d4b46bf2473897
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/plugins/platforms/eglfs/deviceintegration')
4 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp index 7a17b60a5e..9ffffd7471 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp @@ -130,8 +130,8 @@ gbm_surface *QEglFSKmsGbmScreen::createSurface() if (!m_gbm_surface) { qCDebug(qLcEglfsKmsDebug) << "Creating window for screen" << name(); m_gbm_surface = gbm_surface_create(static_cast<QEglFSKmsGbmDevice *>(device())->gbmDevice(), - geometry().width(), - geometry().height(), + rawGeometry().width(), + rawGeometry().height(), GBM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING); } diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp index 0120c0726d..ddb2499751 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp @@ -194,8 +194,8 @@ void QEglJetsonTK1Window::resetSurface() m_format = q_glFormatFromConfig(display, m_config); qCDebug(qLcEglfsKmsDebug) << "Stream producer format is" << m_format; - const int w = cur_screen->geometry().width(); - const int h = cur_screen->geometry().height(); + const int w = cur_screen->rawGeometry().width(); + const int h = cur_screen->rawGeometry().height(); qCDebug(qLcEglfsKmsDebug, "Creating stream producer surface of size %dx%d", w, h); const EGLint stream_producer_attribs[] = { diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp index fb8233a875..55417e4525 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp @@ -98,7 +98,9 @@ QEglFSKmsScreen::~QEglFSKmsScreen() delete m_interruptHandler; } -QRect QEglFSKmsScreen::geometry() const +// Reimplement rawGeometry(), not geometry(). The base class implementation of +// geometry() calls rawGeometry() and may apply additional transforms. +QRect QEglFSKmsScreen::rawGeometry() const { const int mode = m_output.mode; QRect r(m_pos.x(), m_pos.y(), diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h index 9679f70260..7b424b5382 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h @@ -78,7 +78,7 @@ public: QPoint position); ~QEglFSKmsScreen(); - QRect geometry() const Q_DECL_OVERRIDE; + QRect rawGeometry() const Q_DECL_OVERRIDE; int depth() const Q_DECL_OVERRIDE; QImage::Format format() const Q_DECL_OVERRIDE; |