cancel
Showing results for 
Search instead for 
Did you mean: 

rendering time of not-visible objects

alessandro.breuza
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
GaetanGodart
ST Employee

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 :

GaetanGodart_0-1712740534304.png

When setting the image as not visible, I can see that the area is still invalidated :

GaetanGodart_1-1712740586435.png

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,

Gaetan Godart
Software engineer at ST (TouchGFX)

View solution in original post

3 REPLIES 3
GaetanGodart
ST Employee

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 :

GaetanGodart_0-1712740534304.png

When setting the image as not visible, I can see that the area is still invalidated :

GaetanGodart_1-1712740586435.png

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,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hello @GaetanGodart ,

thank you for the clarification.

 

Then animation should be started only when image is visible to increase performance?

Yes that would be a solution.

This demo was not made for performance aspect I think.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)