[SailfishDevel] Upcoming behavioural change with how graphics resources are handled.
Mohammed Hassan
mohammed.hassan at jolla.com
Mon Sep 29 14:43:55 UTC 2014
On Sat, 27 Sep 2014 16:28:42 +0000
Kimmo Lindholm <Kimmo.Lindholm at eke.fi> wrote:
> Hi,
>
> Just wanted to give a follow-up on this topic;
>
> You are affected if you are drawing on Canvas (and don't want to
> repaint it completely when returning to application) Symptom is that
> canvas gets cleared when going away from application (minimizing it
> to cover)
>
> The simplest way to not allow releasing, add two middle lines in your
> main() as suggested in original email;
>
> view->setSource(SailfishApp::pathTo("qml/ankkuri.qml"));
> view->setPersistentOpenGLContext(true);
> view->setPersistentSceneGraph(true);
> view->show();
I'd personally not recommend doing that just because you don't want to
repaint. Releasing the resources decreases the memory footprint of the
application when minimized and allows the system to stay more
responsive.
If a lot of apps start to not release the GL context and scene graph GL
bits then that will negatively impact the whole system.
Just my 0.02
Cheers,
More information about the Devel
mailing list