Skip to content

Conversation

@kisvegabor
Copy link
Member

Notes

@kisvegabor kisvegabor added 🐞 Bug test LVGL's test feature labels Oct 20, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2025

Hi 👋, thank you for your PR!

We've run benchmarks in an emulated environment. Here are the results:

ARM Emulated 32b - lv_conf_perf32b

Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
All scenes avg. 27 (-1) 37 7 7 0
Detailed Results Per Scene
Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
Empty screen 11 33 0 0 0
Moving wallpaper 2 33 1 1 0
Single rectangle 0 50 0 0 0
Multiple rectangles 0 39 (+4) 0 0 0
Multiple RGB images 0 39 0 0 0
Multiple ARGB images 7 (-2) 43 (+1) 0 0 0
Rotated ARGB images 56 (+1) 44 15 15 0
Multiple labels 7 (+2) 33 0 0 0
Screen sized text 95 (-2) 47 20 20 0
Multiple arcs 33 (-5) 33 7 7 0
Containers 4 (+1) 36 (-1) 0 0 0
Containers with overlay 88 21 44 44 0
Containers with opa 6 (-8) 36 (-1) 1 1 0
Containers with opa_layer 18 33 (-1) 5 5 0
Containers with scrolling 45 (-1) 46 (-1) 12 12 0
Widgets demo 67 (-1) 40 16 16 0
All scenes avg. 27 (-1) 37 7 7 0

ARM Emulated 64b - lv_conf_perf64b

Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
All scenes avg. 23 38 6 6 0
Detailed Results Per Scene
Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
Empty screen 11 33 0 0 0
Moving wallpaper 1 33 0 0 0
Single rectangle 0 49 0 0 0
Multiple rectangles 0 45 0 0 0
Multiple RGB images 0 39 0 0 0
Multiple ARGB images 1 38 0 0 0
Rotated ARGB images 30 33 9 9 0
Multiple labels 2 40 (+4) 0 0 0
Screen sized text 76 (-1) 45 17 17 0
Multiple arcs 25 33 6 6 0
Containers 1 (-3) 38 (+1) 0 0 0
Containers with overlay 97 (+8) 23 41 41 0
Containers with opa 16 (+3) 37 (-1) 0 0 0
Containers with opa_layer 9 (+2) 37 (-1) 2 (+1) 2 (+1) 0
Containers with scrolling 44 (-2) 46 (-1) 11 11 0
Widgets demo 66 42 15 (+1) 15 (+1) 0
All scenes avg. 23 38 6 6 0

Disclaimer: These benchmarks were run in an emulated environment using QEMU with instruction counting mode.
The timing values represent relative performance metrics within this specific virtualized setup and should
not be interpreted as absolute real-world performance measurements. Values are deterministic and useful for
comparing different LVGL features and configurations, but may not correlate directly with performance on
physical hardware. The measurements are intended for comparative analysis only.


🤖 This comment was automatically generated by a bot.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@AndreCostaaa
Copy link
Collaborator

I wonder why the CI is failing

@FASTSHIFT FASTSHIFT requested a review from Copilot October 20, 2025 10:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Fix memory leak paths in screenshot comparison tests when the reference image is missing or dimensions mismatch.

  • Add missing lv_draw_buf_destroy(ref_draw_buf) before early returns
  • Free screen buffer on dimension mismatch path to prevent leaks

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 119 to 121
write_png_file(screen_buf_xrgb8888, draw_buf->header.w, draw_buf->header.h, fn_ref_full);
lv_free(screen_buf_xrgb8888);
lv_draw_buf_destroy(ref_draw_buf);
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return value of write_png_file is ignored, which can mask failures to write the reference image. Consider checking the result and returning false (or logging an error) on failure, ensuring cleanup still happens.

Suggested change
write_png_file(screen_buf_xrgb8888, draw_buf->header.w, draw_buf->header.h, fn_ref_full);
lv_free(screen_buf_xrgb8888);
lv_draw_buf_destroy(ref_draw_buf);
unsigned write_res = write_png_file(screen_buf_xrgb8888, draw_buf->header.w, draw_buf->header.h, fn_ref_full);
lv_free(screen_buf_xrgb8888);
lv_draw_buf_destroy(ref_draw_buf);
if(write_res) {
LV_LOG_ERROR("Failed to write reference image to %s (error code: %u)", fn_ref_full, write_res);
return false;
}

Copilot uses AI. Check for mistakes.
LV_LOG_WARN("%s%s", fn_ref_full, " was not found, creating it now from the rendered screen");
write_png_file(screen_buf_xrgb8888, draw_buf->header.w, draw_buf->header.h, fn_ref_full);
lv_free(screen_buf_xrgb8888);
lv_draw_buf_destroy(ref_draw_buf);
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Cleanup logic is duplicated across early returns. Consider consolidating cleanup into a single block (e.g., a cleanup label) and using a status variable to reduce future drift when adding/removing resources.

Copilot uses AI. Check for mistakes.
Comment on lines 127 to 128
lv_free(screen_buf_xrgb8888);
lv_draw_buf_destroy(ref_draw_buf);
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Cleanup logic is duplicated across early returns. Consider consolidating cleanup into a single block (e.g., a cleanup label) and using a status variable to reduce future drift when adding/removing resources.

Copilot uses AI. Check for mistakes.
lv_draw_buf_t * ref_draw_buf = NULL;
unsigned ref_img_width = 0;
unsigned ref_img_height = 0;
unsigned res = read_png_file(&ref_draw_buf, &ref_img_width, &ref_img_height, fn_ref_full);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we have previously discussed, this line is very suspicious. I don't understand how we actually create this lv_draw_buf_t correctly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we modified lodepng to work with draw_bufs.

@liamHowatt liamHowatt merged commit 2a667fd into lvgl:master Oct 26, 2025
41 checks passed
AndreCostaaa pushed a commit to AndreCostaaa/lvgl that referenced this pull request Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 Bug test LVGL's test feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants