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>
This commit is contained in:
BogDan Vatra 2015-03-16 17:47:41 +02:00
parent 05e073deeb
commit 5cb72486ba
2 changed files with 5 additions and 13 deletions

View File

@ -110,9 +110,9 @@ void *QAndroidPlatformNativeInterface::nativeResourceForIntegration(const QByteA
} }
QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList &paramList) QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList &paramList)
: m_touchDevice(0) : m_touchDevice(nullptr)
#ifndef QT_NO_ACCESSIBILITY #ifndef QT_NO_ACCESSIBILITY
, m_accessibility(0) , m_accessibility(nullptr)
#endif #endif
{ {
Q_UNUSED(paramList); Q_UNUSED(paramList);
@ -183,7 +183,7 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList &para
QGuiApplicationPrivate::instance()->setApplicationState(m_defaultApplicationState); QGuiApplicationPrivate::instance()->setApplicationState(m_defaultApplicationState);
} }
bool QAndroidPlatformIntegration::needsBasicRenderloopWorkaround() static bool needsBasicRenderloopWorkaround()
{ {
static bool needsWorkaround = static bool needsWorkaround =
QtAndroid::deviceName().compare(QLatin1String("samsung SM-T211"), Qt::CaseInsensitive) == 0 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 NativeWidgets: return true;
case OpenGL: return true; case OpenGL: return true;
case ForeignWindows: return true; case ForeignWindows: return true;
case ThreadedOpenGL: case ThreadedOpenGL: return !needsBasicRenderloopWorkaround();
if (needsBasicRenderloopWorkaround())
return false;
else
return true;
case RasterGLSurface: return true; case RasterGLSurface: return true;
default: default:
return QPlatformIntegration::hasCapability(cap); return QPlatformIntegration::hasCapability(cap);

View File

@ -117,10 +117,8 @@ public:
void setTouchDevice(QTouchDevice *touchDevice) { m_touchDevice = touchDevice; } void setTouchDevice(QTouchDevice *touchDevice) { m_touchDevice = touchDevice; }
static void setDefaultApplicationState(Qt::ApplicationState applicationState) { m_defaultApplicationState = applicationState; } static void setDefaultApplicationState(Qt::ApplicationState applicationState) { m_defaultApplicationState = applicationState; }
EGLDisplay m_eglDisplay;
private: private:
static bool needsBasicRenderloopWorkaround(); EGLDisplay m_eglDisplay;
QTouchDevice *m_touchDevice; QTouchDevice *m_touchDevice;
QAndroidPlatformScreen *m_primaryScreen; QAndroidPlatformScreen *m_primaryScreen;
@ -140,8 +138,6 @@ private:
static Qt::ApplicationState m_defaultApplicationState; static Qt::ApplicationState m_defaultApplicationState;
QPlatformFontDatabase *m_androidFDB; QPlatformFontDatabase *m_androidFDB;
QImage *m_FbScreenImage;
QPainter *m_compositePainter;
QAndroidPlatformNativeInterface *m_androidPlatformNativeInterface; QAndroidPlatformNativeInterface *m_androidPlatformNativeInterface;
QAndroidPlatformServices *m_androidPlatformServices; QAndroidPlatformServices *m_androidPlatformServices;