AcceleratedRendering States When Opening and Closing Stacks

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

AcceleratedRendering States When Opening and Closing Stacks

Tom Glod via use-livecode
We continue struggle with our app on Android and between mobile controls being instantiated or deleted + oddities with acceleratedRendering, + remote bugging not *really* working, it's a bit of a fishing expedition when everything works on desktop and iOS.

A complete document on accelerated rendering, what it does, impact on the engine, optimal usage etc would be useful. Right now my best option is to look for "acceleratedRendering" Mark Waddington in this list. Maybe we should compile all his replies and submit as a guide addition.

if your goal is to just improve the performance of mobile scrolling fields and groups, and all cards in stack will have one of both or both of these… then it makes sense to turn on acceleratedRendering in the preopenstack handler… or course there are bugs there and work arounds, wait 200 seconds, Panos "fixIt" … the fact that LC on Android will crash if you go home or app switcher and the acceleratedRendering is on.

Setting all the above aside, assuming we implement the necessary "hackarounds" questions today are

1) Do we need to do this

on closeStack
set the acceleratedRendering of this stack to false
end close stack

or if you close the stack are all the mysterious overheads "costs" of acceleratedRendering for that stack "wiped" from the engines brain, whether you turn it off or no, with no residual impact on the rendering of views?

2) assuming you do run that at close stack…if you open a stack B *before* closing the stack A which has acceleratedRendering set to true   is there a cost in terms of the engine ability to render everything in the newly opened stack, remember we have not closed stack A yes. but stack B is now open "on top"

OK simple version then is: what is best practice for this scenario

1) stack "apples" is open, with acceleratedRendering set to true
2) we open stack "oranges" and set the acceleratedRendering of stack this stack (now "oranges") to true
3) we close stack "apples"

how is this best handled, given that we see no problems with this in iOS?

Brahmanathaswami



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: AcceleratedRendering States When Opening and Closing Stacks

Tom Glod via use-livecode
Hi Swami,

I turn accelerated rendering on and off depending on which group the user opens up.

Are you setting the layermode of each group as you go?

Sent from my iPhone

> On Sep 29, 2017, at 1:41 PM, Sannyasin Brahmanathaswami via use-livecode <[hidden email]> wrote:
>
> We continue struggle with our app on Android and between mobile controls being instantiated or deleted + oddities with acceleratedRendering, + remote bugging not *really* working, it's a bit of a fishing expedition when everything works on desktop and iOS.
>
> A complete document on accelerated rendering, what it does, impact on the engine, optimal usage etc would be useful. Right now my best option is to look for "acceleratedRendering" Mark Waddington in this list. Maybe we should compile all his replies and submit as a guide addition.
>
> if your goal is to just improve the performance of mobile scrolling fields and groups, and all cards in stack will have one of both or both of these… then it makes sense to turn on acceleratedRendering in the preopenstack handler… or course there are bugs there and work arounds, wait 200 seconds, Panos "fixIt" … the fact that LC on Android will crash if you go home or app switcher and the acceleratedRendering is on.
>
> Setting all the above aside, assuming we implement the necessary "hackarounds" questions today are
>
> 1) Do we need to do this
>
> on closeStack
> set the acceleratedRendering of this stack to false
> end close stack
>
> or if you close the stack are all the mysterious overheads "costs" of acceleratedRendering for that stack "wiped" from the engines brain, whether you turn it off or no, with no residual impact on the rendering of views?
>
> 2) assuming you do run that at close stack…if you open a stack B *before* closing the stack A which has acceleratedRendering set to true   is there a cost in terms of the engine ability to render everything in the newly opened stack, remember we have not closed stack A yes. but stack B is now open "on top"
>
> OK simple version then is: what is best practice for this scenario
>
> 1) stack "apples" is open, with acceleratedRendering set to true
> 2) we open stack "oranges" and set the acceleratedRendering of stack this stack (now "oranges") to true
> 3) we close stack "apples"
>
> how is this best handled, given that we see no problems with this in iOS?
>
> Brahmanathaswami
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: AcceleratedRendering States When Opening and Closing Stacks

Tom Glod via use-livecode
Jonathan:

The layermode of the scrolling groups is preset to "scrolling"

The question is about the sequence as it relates to visual layer rendering

Open Stack A, turn on acceleratedRendering
Open Stack B, which also turns on its "own" acceleratedRendering
Close Stack A, *after* having open B "on top of Stack A
 
What are the issues, if any, with turning AcceleratedRendering On and off in the above sequence, especially on Android.

a) do we need a "super-nuanced" on and off with careful timing? Seems way too difficult for any newbie unless we have very good documentation.

OR

b) is just this simple:

acceleratedRendering only affects the visible stack on top and the engine, the vRam/visible view that the user sees of the top stack is totally unaffected by the state of the acceleratedRending of stack A above *during and while* Stack B is opened and rendered on the device

the latter seems to be the case on iOS, on Android we are seeing a lot of oddities. Debugging is virtually impossible since it works on iOS and Desktop..

On Android, you can start throwing query dialogs.  after opening Stack B and Closing Stack, you do

put the short name of the top stack into tTopStack

Answer tTopStack with "OK"

and you get "B" (the one just opened) but on screen we see Stack A (the one just closed)



 

On 9/29/17, 11:34 AM, "use-livecode on behalf of Jonathan Lynch via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:

    Hi Swami,
   
    I turn accelerated rendering on and off depending on which group the user opens up.
   
    Are you setting the layermode of each group as you go?

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: AcceleratedRendering States When Opening and Closing Stacks

Tom Glod via use-livecode
It seems like having the layermode set to scrolling for everything forces it to draw too much stuff. What happens if you only do one at a time?

Mark W would know more. But, I have found one at a time means it only gives extra power where it is needed.

Sent from my iPhone

> On Sep 29, 2017, at 9:11 PM, Sannyasin Brahmanathaswami via use-livecode <[hidden email]> wrote:
>
> Jonathan:
>
> The layermode of the scrolling groups is preset to "scrolling"
>
> The question is about the sequence as it relates to visual layer rendering
>
> Open Stack A, turn on acceleratedRendering
> Open Stack B, which also turns on its "own" acceleratedRendering
> Close Stack A, *after* having open B "on top of Stack A
>
> What are the issues, if any, with turning AcceleratedRendering On and off in the above sequence, especially on Android.
>
> a) do we need a "super-nuanced" on and off with careful timing? Seems way too difficult for any newbie unless we have very good documentation.
>
> OR
>
> b) is just this simple:
>
> acceleratedRendering only affects the visible stack on top and the engine, the vRam/visible view that the user sees of the top stack is totally unaffected by the state of the acceleratedRending of stack A above *during and while* Stack B is opened and rendered on the device
>
> the latter seems to be the case on iOS, on Android we are seeing a lot of oddities. Debugging is virtually impossible since it works on iOS and Desktop..
>
> On Android, you can start throwing query dialogs.  after opening Stack B and Closing Stack, you do
>
> put the short name of the top stack into tTopStack
>
> Answer tTopStack with "OK"
>
> and you get "B" (the one just opened) but on screen we see Stack A (the one just closed)
>
>
>
>
>
> On 9/29/17, 11:34 AM, "use-livecode on behalf of Jonathan Lynch via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:
>
>    Hi Swami,
>
>    I turn accelerated rendering on and off depending on which group the user opens up.
>
>    Are you setting the layermode of each group as you go?
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: AcceleratedRendering States When Opening and Closing Stacks

Tom Glod via use-livecode
It's not set for "everything" only scrolling groups.

How can it be drawing too much? if there is only one scrolling group on the card and all other cards, stacks etc are closed or not in view, how does having the layermode set in an unopened stack start to "draw too much"

??



Jonathan Lynch wrote:

    It seems like having the layermode set to scrolling for everything forces it to draw too much stuff. What happens if you only do one at a time?
   
    Mark W would know more. But, I have found one at a time means it only gives extra power where it is needed.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: AcceleratedRendering States When Opening and Closing Stacks

Tom Glod via use-livecode
I doubt the layermode is an issue here. Layermode is relevant only when the
card is open.

I'm not where I can review Mark's post about it, but I think
acceleratedRendering basically tells the engine to buffer the content of
designated controls so they will move smoothly. The layermode tells the
engine what type of movement will be implemented. This is all done at the
card level and the cache is flushed when the card closes or when the cache
is full. A stack or card that isn't open has no effect on anything.

Someone correct me if I mangled the concept.
--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On September 29, 2017 10:38:58 PM Sannyasin Brahmanathaswami via
use-livecode <[hidden email]> wrote:

> It's not set for "everything" only scrolling groups.
>
> How can it be drawing too much? if there is only one scrolling group on the
> card and all other cards, stacks etc are closed or not in view, how does
> having the layermode set in an unopened stack start to "draw too much"
>
> ??
>
>
>
> Jonathan Lynch wrote:
>
>     It seems like having the layermode set to scrolling for everything forces
>     it to draw too much stuff. What happens if you only do one at a time?
>
>     Mark W would know more. But, I have found one at a time means it only gives
>     extra power where it is needed.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: AcceleratedRendering States When Opening and Closing Stacks

Tom Glod via use-livecode
Well …"exactly"

And that is what we want to clarify

if stack A  is open and contents for its front card are buffered.

Now open stack B on top of stack A with Accelerated Rendering on..

Just then…  before we close Stack, for n number of milliseconds we have buffered objects for 2 different cards/stacks. N'est ce pas?

So the question is: could this be a problem for Android or not?

Our symptom is, (as you know) the objects for stack A still appear on screen, ( only on Android) even if you log for the current top stack and LC engine returns "Stack B"  we are seeing the contents of the card for Stack A even after it has been closed…

BR


J. Landman Gay wrote:

    This is all done at the
    card level and the cache is flushed when the card closes or when the cache
    is full. A stack or card that isn't open has no effect on anything.
   
    Someone correct me if I mangled the concept.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: AcceleratedRendering States When Opening and Closing Stacks

Tom Glod via use-livecode
On 9/30/17 12:42 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
> Our symptom is, (as you know) the objects for stack A still appear on screen, ( only on Android) even if you log for the current top stack and LC engine returns "Stack B"  we are seeing the contents of the card for Stack A even after it has been closed…

I've got to think this is a bug. It doesn't happen on desktop or iOS, so
it would make sense it's something in the Android implementation.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode