308 views
in GUI Development by

Greetings!

I have what I expect to be a performance issue when rotating a short text (5 words, no background). The text has it's own Group that is being linked to a WarpGroup.Group with property Buffered = true and rotated using the RotateAndScale-function together with a FloatEffect. Furthermore, the animation occurs in UpdateViewState that is triggered by continuously calling InvalidateViewState from the FloatEffect.
For some reason, that animation puts the processor (stm32f7xx) at ~96% load at its peak. I haven't fully investigated if the high CPU load is causing the lagg, but its my best guess at the moment. At it's current state, the animation has too low frame rate to be usable in my application.

So, to my question. Is there some way to optimize the animation to improve performance, or otherwise make the lagg disappear? Would for example making the text into a PNG or SVG help solve the issue? Any suggestions I can try is much appreciated!

Kind regards,
Måns

1 Answer

0 votes
by
Hi Mans,

please consider, that the graphics accelerator on STM32Fxx targets (DMA2D) is not able to make any affine or perspective transformation. This means, that a rotation has to be done by the CPU (pixel per pixel).

In principal it is a good idea to use a buffered group for such animations. But the resulting performance depends completely on the affected area. How large is the buffered group?

What color format are you using, which display size and which target are you using? What are the resulting frames per second?

Best regards,

Manfred.
by
One more thing: If you are using InvalidateViewState() on the buffered group, then it will be redrawn every frame => so there is no advantage of the buffered group. Just use RotateAndScale() to make the rotation.
by

Thank you for the quick answer.

The buffered group covers the entire screen (320x320) but the text only covers the center part of the screen (font height 34).
I am using color format RGB888 .
Could you elaborate what you mean by target?
I am currently not measuring FPS, but will implement it asap.

by
With target I mean the STM32Fxx microcontroller. Which one is it?
by
Please try also to reduce the buffered group to the necessary minimum.
by

After removing all unnecessary (transparent) background of the group, the animation looks smooth! Thank you again for the quick and great support!

Kind regards,
Måns

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...