summaryrefslogtreecommitdiffstats
path: root/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@qt.io>2016-07-05 13:46:01 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-08-12 11:20:41 +0000
commit124987e4bc4b39cae7074eb75e2bb3e3436aded0 (patch)
tree769ac2d77600a6b087d9b28f88851f94f78cebb2 /src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp
parent95e1012c9dc49e0afbed52d17ff32a4a59a723f7 (diff)
Android: Fix texture leak in QAndroidTextureVideoOutput
Simplify the ownership of the OpenGL resources and make it simpler to release individual resources as needed. Previously we would reset the texture handle without releasing it back to the system, making us leak texture each time the video output was reset. Also, be consistent with the type used for the texture handle. Task-number: QTBUG-54340 Change-Id: Ic3b3c7322677a909e51aa5983fa99ccf8b290302 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp')
-rw-r--r--src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp b/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp
index bc7187e9c..cd6d41d84 100644
--- a/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp
+++ b/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp
@@ -56,7 +56,7 @@ static void notifyFrameAvailable(JNIEnv* , jobject, jlong id)
Q_EMIT obj->frameAvailable();
}
-AndroidSurfaceTexture::AndroidSurfaceTexture(unsigned int texName)
+AndroidSurfaceTexture::AndroidSurfaceTexture(quint32 texName)
: QObject()
{
Q_STATIC_ASSERT(sizeof (jlong) >= sizeof (void *));
@@ -157,7 +157,7 @@ jobject AndroidSurfaceTexture::surfaceHolder()
return m_surfaceHolder.object();
}
-void AndroidSurfaceTexture::attachToGLContext(int texName)
+void AndroidSurfaceTexture::attachToGLContext(quint32 texName)
{
if (QtAndroidPrivate::androidSdkVersion() < 16 || !m_surfaceTexture.isValid())
return;