On 06/05/14 10:55, Gunnar Sletta wrote:

> to be "false" meaning that when an application is not on screen, its graphics
> memory and OpenGL context will be deleted.

What does on screen mean? Since....

> affected. - Covers are unaffected.

.... my cover shows the GL context - so I'm not sure quite how this will work :)

> Only applications using Qt Quick, QSG-classes and/or QOpenGLContext and/or
> raw OpenGL calls ARE affected. If this applies to you, there are two ways to
> deal with graphics stuff being released:
> 
> 1. Don't allow releasing.
> 
> main.cpp AFTER you told it to load the QML file and BEFORE you show it.
> 
> QQuickWindow::setPersistentSceneGraph(true); 
> QQuickWindow::setPersistentOpenGL(true);
> 
> This will revert to the current behaviour where graphics resources are
> retained, even when the application is backgrounded.

One concern is that putting these in the wrong place will of course not be a
problem until the switch and then at that point the app will break.

Hopefully we'll have the public update-RC programme in place by then so app
developers can do QA :)

> 2. React and handle it.
> 
> Use the QQuickWindow::sceneGraphInvalidated() and
> QOpenGLContext::aboutToBeDestroyed() signals to clean up your graphics
> resources and let your application handle not being shown on screen.

I assume this is not testable for Harbour apps until 5.2 is actually released?

> ---
> 
> I can't tell you when the change over happens, but we're aiming for some time
> later this year :) I'm giving you an early heads up so you can update your
> applications now if you are affected. Reacting to
> http://qt-project.org/doc/qt-5/qquickwindow.html#sceneGraphInvalidated or
> http://qt-project.org/doc/qt-5/qopenglcontext.html#aboutToBeDestroyed is
> something something you can already do. Same if you want to avoid the issue
> all together and setPersistent(SceneGraph|OpenGL)(true) right away. These
> APIs have been there since Qt 5.0.

ah - thanks. I wasn't sure when individual methods appeared :)

David
_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to