summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformopenglwindow.h
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kde.org>2015-01-08 17:11:43 +0200
committerBogDan Vatra <bogdan@kde.org>2015-01-10 16:43:01 +0100
commita0737f65a62a5d72f15f5f1196b86f16605d936b (patch)
tree63cb34931401d6086390388a063a8d71f4bf8c60 /src/plugins/platforms/android/qandroidplatformopenglwindow.h
parent05d39ec9c0428696d3d523e6b024df59d456fc59 (diff)
Fixes for surface creation/destruction
- After reset a surface we must call makeCurrent before we are usign swapBuffers. - No need to set the surface in QPA when surfaceCreated are called in QtSurface.java, some time the OpenGL surface is not fully initialized at this stage. Is better to wait for surfaceChanged which is always fired at least once. - DO NOT reset m_surfaceId to 1 when there is no surface. The problem is that if we have one surface and when we distory it we don't (need to) wait for its surfaceChanged/surfaceDestroyed notifications, and if we create another one quicly it will have the same id (1). Task-number: QTBUG-39712 Change-Id: I2aa31e5b59d81ef3b03624d4636a4381eea6d543 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformopenglwindow.h')
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglwindow.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformopenglwindow.h b/src/plugins/platforms/android/qandroidplatformopenglwindow.h
index 71787edee1..6d6548fc6a 100644
--- a/src/plugins/platforms/android/qandroidplatformopenglwindow.h
+++ b/src/plugins/platforms/android/qandroidplatformopenglwindow.h
@@ -54,7 +54,7 @@ public:
EGLSurface eglSurface(EGLConfig config);
QSurfaceFormat format() const;
- void checkNativeSurface(EGLConfig config);
+ bool checkNativeSurface(EGLConfig config);
void applicationStateChanged(Qt::ApplicationState);
@@ -66,7 +66,7 @@ protected:
void clearEgl();
private:
- EGLDisplay m_eglDisplay;
+ EGLDisplay m_eglDisplay = EGL_NO_DISPLAY;
EGLSurface m_eglSurface = EGL_NO_SURFACE;
EGLNativeWindowType m_nativeWindow = nullptr;