path: root/src/plugins/platforms/android/qandroidplatformopenglwindow.h
diff options
authorLaszlo Agocs <>2014-08-20 11:48:02 +0200
committerLaszlo Agocs <>2014-08-25 17:40:23 +0200
commita4f50269f82695fbd0dd344f87b4b355feff4333 (patch)
tree7ae4b01a38b483c6446d5ee4dda1ac09a9bd4f9f /src/plugins/platforms/android/qandroidplatformopenglwindow.h
parent86886566410cf7cc4587b3fbb851b3615067cca4 (diff)
Support QOpenGLWidget and QQuickWidget on Android
It gets somewhat complicated due to the fact that a RasterGLSurface window (i.e. any widget window since 5.3) may behave either like an OpenGLSurface or a RasterSurface, and the expected behavior may change on each backingstore sync. This does not fit designs where the platform window implementation is separated and there is different behavior for raster and GL windows. Therefore QAndroidPlatformOpenGLWindow is now made capable of behaving like the raster one, based on a flag communicated from the widget stack via QWindowPrivate (since the plugin knows nothing about widgets). This means that widget windows that do not have renderToTexture children (QOpenGLWidget, QQuickWidget) will go through the raster path, while the ones that have will behave like an OpenGL window with the actual rendering happening in QPlatformBackingStore::composeAndFlush(). The surface type is RasterGLSurface in both cases nonetheless. Task-number: QTBUG-37907 Change-Id: I6f9261fc0fd993afcda7f30d379c5410069033d3 Reviewed-by: Paul Olav Tvete <>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformopenglwindow.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformopenglwindow.h b/src/plugins/platforms/android/qandroidplatformopenglwindow.h
index 713f943bc5..5f7089d5a4 100644
--- a/src/plugins/platforms/android/qandroidplatformopenglwindow.h
+++ b/src/plugins/platforms/android/qandroidplatformopenglwindow.h
@@ -66,6 +66,8 @@ public:
void applicationStateChanged(Qt::ApplicationState);
+ void repaint(const QRegion &region) Q_DECL_OVERRIDE;
virtual void surfaceChanged(JNIEnv *jniEnv, jobject surface, int w, int h);
void createEgl(EGLConfig config);
@@ -80,6 +82,7 @@ private:
QJNIObjectPrivate m_androidSurfaceObject;
QWaitCondition m_surfaceWaitCondition;
QSurfaceFormat m_format;
+ QRect m_oldGeometry;