acceleratedRendering scope

Mark Waddingham mark at livecode.com
Mon Aug 21 12:51:48 EDT 2017


On 2017-08-21 18:41, Bob Sneidar via use-livecode wrote:
> Hi all.
> 
> Since acceleratedRendering is a stack property, does it only apply to
> a given stack, and not, for example to a sub stack? What would the
> advantage be of having it off? If none, why even have it?

It is per stack, and not inherited.

Whether you get a benefit or not from acceleratedRendering depends on 
your stack. If you don't set the layerMode property on anything, then it 
will generally cause a slight performance penalty (although this perhaps 
needs more direct measurement to compare - particularly between desktop 
and mobile which are very different graphics performance wise).

The benefits of acceleratedRendering come out when you aren't changing 
how any object looks that often, and you have a lot of objects moving - 
or, indeed, when you are moving large objects around, but not changing 
very much of them as you do so.

So, for example, if you emulating visual effects by moving large 
controls around periodically you might well find you get a better 
framerate (particularly on mobile) by turning accelRendering on, setting 
the layerMode of just the moving controls to dynamic, then turning it 
off again.

If you are doing a game with lots of moving objects, then you will 
pretty much always gain advantage from making all the moving object's 
layerMode dynamic; and leaving the scenery / HUD type things as static.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the Use-livecode mailing list