cancel
Showing results for 
Search instead for 
Did you mean: 

Questions regarding invalidate() and draw()

hvv
Associate

Hi!

We got an old TouchGFX (4.10) application where the screen freezes from time to time. Freeze means we no longer get tick events, whereas the other FreeRTOS tasks are still alive. *Most* times this happens after Button pressed events.

This raises understanding questions on our side:

  • I presume that calling invalidate() puts the drawable object in some kind of a queue, right?
    • What happens if invalidate() is called twice or more times on the same drawable object? Is the drawable queued twice or more times and is this drawable object drawn twice or more times?
  • What happens if a drawable object is
    - completely
    - partially
    hidden by an upper drawable object and invalidate() is called? (All drawables are set visible). Is the (partially) hidden drawable object drawn (completely) in both cases?
  • Is it possible to query an drawable object whether it has already been queued after a invalidate() call?
  • Lets pretend a Button changes its image on a Button pressed event. From our understanding there're two re-draw events:
    - Re-draw the old image when the button is released (triggered by TouchGFX framework).
    - Re-draw the new image as a result of the Button pressed event (triggered by us).
    Are these two events drawn in the same tick? Meaning in the same update phase?
  • Lets pretend a Button is within a Container and the Container is moved/slided/animated out of the Screen on a Button pressed event. We see here are two re-draw events as well:
    - Re-draw the old image when the button is released (triggered by TouchGFX framework).
    - Re-draw the container (incl. the Button) when starting to move/slide/animate the container out of the Screen (triggered by us).
    Are these two events drawn in the same tick? Meaning in the same update phase?
  • Is it possible that the invalidate() queue gets overcrowded?

Regarding the missing the tick events in our application: Are there any (known) user errors when using TouchGFX that prevents the TouchGFX framework from sending tick events? Or to ask the question the other way: That must have gone wrong that the TouchGFX framework stopped sending tick events?

Thank you for your help.

0 REPLIES 0