From a0737f65a62a5d72f15f5f1196b86f16605d936b Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Thu, 8 Jan 2015 17:11:43 +0200 Subject: 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 --- src/android/jar/src/org/qtproject/qt5/android/QtSurface.java | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/android') diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtSurface.java b/src/android/jar/src/org/qtproject/qt5/android/QtSurface.java index 34fc31b222..516671739e 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtSurface.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtSurface.java @@ -45,7 +45,6 @@ package org.qtproject.qt5.android; import android.app.Activity; import android.content.Context; import android.graphics.PixelFormat; -import android.util.Log; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.SurfaceHolder; @@ -87,7 +86,6 @@ public class QtSurface extends SurfaceView implements SurfaceHolder.Callback @Override public void surfaceCreated(SurfaceHolder holder) { - QtNative.setSurface(getId(), holder.getSurface(), getWidth(), getHeight()); } @Override -- cgit v1.2.3