summaryrefslogtreecommitdiffstats
path: root/src/plugins/android/src/common/qandroidvideooutput.h
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@qt.io>2016-05-04 15:41:32 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-05-10 07:37:51 +0000
commitba8127639857232d8a37e953c5cda84203360d97 (patch)
tree441b0882a6846d45f7e98d0da6c37b15c5643bbd /src/plugins/android/src/common/qandroidvideooutput.h
parent37d91ff58d33a573f4d546282c0c5dfe0e5f4aa2 (diff)
Android: improve texture rendering on API level >= 16.
Android API level 16 added SurfaceTexture::attachToGLContext(). This allows to create the OpenGL texture when the first video frame is available, rather than at initialization. This means we can do without the ugly hack that makes the render thread call us back through some custom property. Additionally, it allows to recreate a new OpenGL texture every time the SurfaceTexture is reset. Task-number: QTBUG-51911 Change-Id: I17b04524d426c42ef8aa0288b0731597bc9eba62 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/plugins/android/src/common/qandroidvideooutput.h')
-rw-r--r--src/plugins/android/src/common/qandroidvideooutput.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/android/src/common/qandroidvideooutput.h b/src/plugins/android/src/common/qandroidvideooutput.h
index f4401fa1d..0068a5809 100644
--- a/src/plugins/android/src/common/qandroidvideooutput.h
+++ b/src/plugins/android/src/common/qandroidvideooutput.h
@@ -110,6 +110,8 @@ private:
QOpenGLShaderProgram *m_program;
OpenGLResourcesDeleter *m_glDeleter;
+ bool m_surfaceTextureCanAttachToContext;
+
friend class AndroidTextureVideoBuffer;
};