Android: refactor video renderer.
Removed the overhead of having to create a shared OpenGL context in the GUI thread and pre-render the frame into a FBO. We now directly render the GL_TEXTURE_EXTERNAL_OES in the QtQuick render thread, using an Android-specific QSGVideoNode. We also use a callback from the render thread to create the texture from there and not have to create a separate shared OpenGL context. Change-Id: I6c8eb94b47d0a03329c912701b8af3fb5ebd1876 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
329d9d4563
commit
be7a6241e7
@@ -193,6 +193,13 @@ QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode,
|
||||
if (!m_glContext) {
|
||||
m_glContext = QOpenGLContext::currentContext();
|
||||
m_surface->scheduleOpenGLContextUpdate();
|
||||
|
||||
// Internal mechanism to call back the surface renderer from the QtQuick render thread
|
||||
QObject *obj = m_surface->property("_q_GLThreadCallback").value<QObject*>();
|
||||
if (obj) {
|
||||
QEvent ev(QEvent::User);
|
||||
obj->event(&ev);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_frameChanged) {
|
||||
|
||||
Reference in New Issue
Block a user