diff options
author | BogDan Vatra <bogdan@kde.org> | 2015-03-16 17:47:41 +0200 |
---|---|---|
committer | BogDan Vatra <bogdan@kde.org> | 2015-03-23 07:38:33 +0000 |
commit | 5cb72486bae95562fad3c4369b35d39d336ca5c0 (patch) | |
tree | c9609e7993c91d05df66e57d3ff68f1c57a91f4c /src/plugins | |
parent | 05e073deebfd38103f283f8698d47a6d4a76737e (diff) |
Android: Early spring QPA cleanup
- Move m_eglDisplay to private section
- needsBasicRenderloopWorkaround is needed only locally so, make it a
static function
- remove unused member variables.
Change-Id: I3e845301ec66a322621c7d9e6fac257320a40f77
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformintegration.cpp | 12 | ||||
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformintegration.h | 6 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp index 2641301616..eb96bf11f0 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp @@ -110,9 +110,9 @@ void *QAndroidPlatformNativeInterface::nativeResourceForIntegration(const QByteA } QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶mList) - : m_touchDevice(0) + : m_touchDevice(nullptr) #ifndef QT_NO_ACCESSIBILITY - , m_accessibility(0) + , m_accessibility(nullptr) #endif { Q_UNUSED(paramList); @@ -183,7 +183,7 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶ QGuiApplicationPrivate::instance()->setApplicationState(m_defaultApplicationState); } -bool QAndroidPlatformIntegration::needsBasicRenderloopWorkaround() +static bool needsBasicRenderloopWorkaround() { static bool needsWorkaround = QtAndroid::deviceName().compare(QLatin1String("samsung SM-T211"), Qt::CaseInsensitive) == 0 @@ -200,11 +200,7 @@ bool QAndroidPlatformIntegration::hasCapability(Capability cap) const case NativeWidgets: return true; case OpenGL: return true; case ForeignWindows: return true; - case ThreadedOpenGL: - if (needsBasicRenderloopWorkaround()) - return false; - else - return true; + case ThreadedOpenGL: return !needsBasicRenderloopWorkaround(); case RasterGLSurface: return true; default: return QPlatformIntegration::hasCapability(cap); diff --git a/src/plugins/platforms/android/qandroidplatformintegration.h b/src/plugins/platforms/android/qandroidplatformintegration.h index c0a9229056..ccf683e253 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.h +++ b/src/plugins/platforms/android/qandroidplatformintegration.h @@ -117,10 +117,8 @@ public: void setTouchDevice(QTouchDevice *touchDevice) { m_touchDevice = touchDevice; } static void setDefaultApplicationState(Qt::ApplicationState applicationState) { m_defaultApplicationState = applicationState; } - EGLDisplay m_eglDisplay; private: - static bool needsBasicRenderloopWorkaround(); - + EGLDisplay m_eglDisplay; QTouchDevice *m_touchDevice; QAndroidPlatformScreen *m_primaryScreen; @@ -140,8 +138,6 @@ private: static Qt::ApplicationState m_defaultApplicationState; QPlatformFontDatabase *m_androidFDB; - QImage *m_FbScreenImage; - QPainter *m_compositePainter; QAndroidPlatformNativeInterface *m_androidPlatformNativeInterface; QAndroidPlatformServices *m_androidPlatformServices; |