How to improve the frame rate when I use lv_img_set_zoom

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Be sure you have checked the FAQ and read the relevant part of the documentation.
  • If applicable use the Simulator to eliminate hardware related issues.

Delete this section if you read and applied the mentioned points.

Description

Hello,
I have studied LVGL for about three years, I need to make a scroll panel, and when scroll panel’s child locate in the center, panel’s child need to be enlarged.
I use LV_EVENT_SCROLL, when panel recieved this event, its use lv_img_set_zoom to make child located canter larger.
but when I use lv_img_set_zoom, the fps(frame rate) is lower, between 9~15.
So, does Lvgl has any function to solve this question?
by the way, chage img’s angle will make fps(frame rate) lower too;

What MCU/Processor/Board and compiler are you using?

ESP

What LVGL version are you using?

8.3.3

What do you want to achieve?

have better fps when I use lv_img_set_zoom.
the code is:

when i scroll panel, the fps will be low.

What have you tried so far?

I have use larger draw buffer, but it’s not useful
draw buffer size is more than 1/2 of screen

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

/*You code here*/

static void scroll_event(lv_event_t e)
{
lv_obj_t* target = lv_event_get_targetr(e);
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_SCROLL{
get_target_child_locate();

     if(is_child_in_center()){
         lv_set_img_zoom(child, 400);
     }
}

}

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

Hello, I am having a similar problem. I want to use the transform_angle. Same problem fps drops. The best results I have gotten were when I changed in lv_conf.h:

#define LV_MEM_CUSTOM to 1

and

#define LV_MEMCPY_MEMSET_STD to 1

This keeps my program at 15-17 fps, but it allows me to rotate very large objects. If you have not yet tried this, I suggest you do, maybe it helps you.

Thank you very much. Currently, we are giving up using images to avoid this issue. I will try these two configurations later

Please let me know how it goes and if you find any alternative solutions, this is still a problem I am dealing with.

My solution is to bypass the use of the ‘zoom’ feature on the application.
For example, creating multiple sizes of images using external tools, then switching between images during the sliding process, and ultimately only requiring similar display effects

Sadly that wont work for me, I need to rotate non static text.
A small update on my part.
Turning off anti-aliasing gave me a 1-2 fps boost.

Maybe you can use the snapshot after you rotate your text