diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-20 11:48:02 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-25 17:40:23 +0200 |
commit | a4f50269f82695fbd0dd344f87b4b355feff4333 (patch) | |
tree | 7ae4b01a38b483c6446d5ee4dda1ac09a9bd4f9f /src/plugins/platforms/android/qandroidplatformintegration.cpp | |
parent | 86886566410cf7cc4587b3fbb851b3615067cca4 (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 <paul.tvete@digia.com>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformintegration.cpp')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformintegration.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp index 829227f81c..53cb3588f6 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp @@ -62,7 +62,6 @@ #include "qandroidplatformfontdatabase.h" #include "qandroidplatformopenglcontext.h" #include "qandroidplatformopenglwindow.h" -#include "qandroidplatformrasterwindow.h" #include "qandroidplatformscreen.h" #include "qandroidplatformservices.h" #include "qandroidplatformtheme.h" @@ -192,6 +191,7 @@ bool QAndroidPlatformIntegration::hasCapability(Capability cap) const return false; else return true; + case RasterGLSurface: return true; default: return QPlatformIntegration::hasCapability(cap); } @@ -227,8 +227,6 @@ QPlatformWindow *QAndroidPlatformIntegration::createPlatformWindow(QWindow *wind { if (window->type() == Qt::ForeignWindow) return new QAndroidPlatformForeignWindow(window); - else if (window->surfaceType() == QSurface::RasterSurface) - return new QAndroidPlatformRasterWindow(window); else return new QAndroidPlatformOpenGLWindow(window, m_eglDisplay); } |