2024-04-08 06:02 AM
Hi,
how is supposed to work rendering of objects set as "not visible"?
My layout is composed of several containers/objects whose visibility is turned on or off at runtime.
I've noticed that rendering time is high also when objects are hidden, as if they were always rendered.
As a counterproof, I've used the "Animated image" example on an STM32H735G-DK.
When animation is off, rendering time (measured on Arduino D2 pin) is approx. 250us; when on, it raises to 800us ca.
Setting the animation widget as not visible does not change rendering time: 250us when off, 800us when on despite nothing drawn on display!
Am I missing something?
TouchGFX v. 4.23.2
Alessandro
Solved! Go to Solution.
2024-04-10 02:23 AM
Hello @alessandro.breuza ,
I have tested the animated image example.
In the simulator, by pressing F2, it shows the area that are invalidated (redrawn).
(Other useful shortcuts : simulator shortcuts )
When I clicked on start, the area around the animation gets invalidated :
When setting the image as not visible, I can see that the area is still invalidated :
By clicking the button, we execute the startAnimation function which automatically redraw the area even if not visible.
The render time is directly linked to the size the the invalidated area.
Here are some more documentation about rendering time and performances :
- Main loop rendering
- TouchGFX performances
The render time is only affected by how much there is to render on the screen and this is defined based on the size of the area to redraw. In the specific case of the animated image example, the animation get invalidated when running whether it is visible or not.
The number of layer doesn't affect rendering time, it only affects CPU required calculations but the real bottleneck is the area to invalidate.
If this answer your question, I invite you to select this answer as 'best solution".
Regards,
2024-04-10 02:23 AM
Hello @alessandro.breuza ,
I have tested the animated image example.
In the simulator, by pressing F2, it shows the area that are invalidated (redrawn).
(Other useful shortcuts : simulator shortcuts )
When I clicked on start, the area around the animation gets invalidated :
When setting the image as not visible, I can see that the area is still invalidated :
By clicking the button, we execute the startAnimation function which automatically redraw the area even if not visible.
The render time is directly linked to the size the the invalidated area.
Here are some more documentation about rendering time and performances :
- Main loop rendering
- TouchGFX performances
The render time is only affected by how much there is to render on the screen and this is defined based on the size of the area to redraw. In the specific case of the animated image example, the animation get invalidated when running whether it is visible or not.
The number of layer doesn't affect rendering time, it only affects CPU required calculations but the real bottleneck is the area to invalidate.
If this answer your question, I invite you to select this answer as 'best solution".
Regards,
2024-04-10 02:53 AM
Hello @GaetanGodart ,
thank you for the clarification.
Then animation should be started only when image is visible to increase performance?
2024-04-10 04:38 AM
Yes that would be a solution.
This demo was not made for performance aspect I think.
Regards,