Yes, I did choose this way by the nature of my paint application.
Potentially recording all strokes etc. could consume also some amount of memory,
and maybe make the usage-experience tacky.

On charts etc, I also would redraw, and the data "is there".

I have another app where I need to implement that other method too.

-kimmo

On 29 Sep 2014, at 16:43, Mohammed Hassan <mohammed.has...@jolla.com> wrote:

> On Sat, 27 Sep 2014 16:28:42 +0000
> Kimmo Lindholm <kimmo.lindh...@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

I completely agree :) 

Though setting the persistent GL/SG flags is very helpful "to get it running" 
after the change over, I would suggest that applications try to avoid it when 
possible.

For the case of Canvas, the problem arises if the application uses 
Canvas.FramebufferObject AND relies on the contents of the canvas not being 
cleared between calls to Canvas.onPaint. It should be a pretty rare scenario. 
However, for this specific scenario, there is no good alternative, so it is the 
tool of choice.

cheers,
Gunnar

www.sletta.org

> 
> Cheers,
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to