cancel
Showing results for 
Search instead for 
Did you mean: 

swipecontainer slow due to rerendering of SVG images

Jcoop.1
Associate II

I'm currently developing a touchpanel on a H7a3 in which i use a swipecontainer on the main page.

In this swipecontainer are multiple buttons with each time a svg image on it. 

On scrolling this, the srolling is very shaky and slow. Measuring reveals that the rendertime is more then 75ms.

Replacing the svg images with regular bitmaps solved the issue. 

Now is my question, why are apparently the svg images rendered every time the swipecontainer moves?

One would expect that this is only a shift of a memory zone so should only be a copy action? 

 

many thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Jcoop.1,

SVGs are not cached and should be redrawn each time they are moved. So, if you need to save up flash storage by using SVGs, but due to their performance you cannot do that, I suggest using Dynamic Bitmaps instead.

If you have more questions, don't hesitate to ask!

Mohammad MORADI
ST Software Developer | TouchGFX

View solution in original post

2 REPLIES 2
rbnt
Associate

I am having the same issue, using png images instead solves the issue, but I would rather keep on using svg images. Any help on this would be really appreciated.

Hello @Jcoop.1,

SVGs are not cached and should be redrawn each time they are moved. So, if you need to save up flash storage by using SVGs, but due to their performance you cannot do that, I suggest using Dynamic Bitmaps instead.

If you have more questions, don't hesitate to ask!

Mohammad MORADI
ST Software Developer | TouchGFX