diff --git a/demos/benchmark/README.md b/demos/benchmark/README.md deleted file mode 100644 index 6518490edee..00000000000 --- a/demos/benchmark/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Benchmark demo - - -![LVGL benchmark running](screenshot1.png) - -## Overview - -The benchmark demo tests the performance in various cases. -For example rectangle, border, shadow, text, image blending, image transformation, blending modes, etc. -All tests are repeated with 50% opacity. - -The size and position of the objects during testing are set with a pseudo random number to make the benchmark repeatable. - -On to top of the screen the title of the current test step, and the result of the previous step is displayed. - -## Run the benchmark -- In `lv_conf.h` or equivalent places set `LV_USE_DEMO_BENCHMARK 1` -- After `lv_init()` and initializing the drivers and call `lv_demo_benchmark(mode)` -- If you only want to run a specific scene for any purpose (e.g. debug, performance optimization etc.), you can call `lv_demo_benchmark_run_scene(mode, scene_idx)` instead of `lv_demo_benchmark()`and pass the scene number. -- If you enabled trace output by setting macro `LV_USE_LOG` to `1` and trace level `LV_LOG_LEVEL` to `LV_LOG_LEVEL_USER` or higher, benchmark results are printed out in `csv` format. - - -## Modes -The `mode` should be passed to `lv_demo_benchmark(mode)` or `lv_demo_benchmark_run_scene(mode, scene_idx)`. - -- `LV_DEMO_BENCHMARK_MODE_RENDER_AND_DRIVER` Render the scenes and show them on the display. Measure rendering time but it might contain extra time when LVGL waits for the driver. Run each scenes for a few seconds so the performance can be seen by eye too. As only the rendering time is measured and converted to FPS, really high values (e.g. 1000 FPS) are possible. -- `LV_DEMO_BENCHMARK_MODE_REAL` Similar to `RENDER_AND_DRIVER` but instead of measuring the rendering time only measure the real FPS of the system. E.g. even if a scene was rendered in 1 ms, but the screen is redrawn only in every 100 ms, the result will be 10 FPS. -- `LV_DEMO_BENCHMARK_MODE_RENDER_ONLY` Temporarily display the `flush_cb` so the pure rendering time will be measured. The display is not updated during the benchmark, only at the end when the summary table is shown. Renders a given number of frames from each scene and calculate the FPS from them. - - -## Result summary -In the end, a table is created to display measured FPS values. - -On top of the summary screen, the "Weighted FPS" value is shown. -In this, the result of the more common cases are taken into account with a higher weight. - -"Opa. speed" shows the speed of the measurements with opacity compared to full opacity. -E.g. "Opa. speed = 90%" means that rendering with opacity is 10% slower. - -In the first section of the table, "Slow but common cases", those cases are displayed which are considered common but were slower than 20 FPS. - -Below this in the "All cases section" all the results are shown. The < 10 FPS results are shown with red, the >= 10 but < 20 FPS values are displayed with orange. - -![LVGL benchmark result summary](screenshot2.png) - - - -**NOTE**: Compared to the past, the use of rotation and zoom(scaling) in GUI applications has become increasingly common. Therefore, starting from LVGL9, we have assigned a higher priority to zoom(scaling) and rotation operations. diff --git a/demos/benchmark/lv_demo_benchmark.h b/demos/benchmark/lv_demo_benchmark.h index d50055a6f62..550c6843d1f 100644 --- a/demos/benchmark/lv_demo_benchmark.h +++ b/demos/benchmark/lv_demo_benchmark.h @@ -29,9 +29,25 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ -/** Run all test scenes in the LVGL benchmark with a given mode +/** + * Run all benchmark scenes. + * + * On the summary end screen the values shall be interpreted according to the followings: + * - CPU usage: + * - If `LV_SYSMON_GET_IDLE` is not modified it's measured based on the time spent in + * `lv_timer_handler`. + * - If an (RT)OS is used `LV_SYSMON_GET_IDLE` can be changed to a custom function + * which returns the idle percentage of idle task. + * + * - FPS: LVGL attempted to render this many times in a second. It's limited based on `LV_DEF_REFR_PERIOD` + * + * - Render time: LVGL spent this much time with rendering only. It's not aware of task yielding, + * but simply the time difference between the start and end of the rendering is measured + * + * - Flush time: It's the sum of + * - the time spent in the `fluch_cb` and + * - the time spent with waiting for flush ready. */ - void lv_demo_benchmark(void); /********************** diff --git a/demos/benchmark/screenshot1.png b/demos/benchmark/screenshot1.png index 845f2be62a2..834e9b9d7e8 100644 Binary files a/demos/benchmark/screenshot1.png and b/demos/benchmark/screenshot1.png differ diff --git a/demos/benchmark/screenshot2.png b/demos/benchmark/screenshot2.png index 0a0023b60f6..c1c2ab5e1b3 100644 Binary files a/demos/benchmark/screenshot2.png and b/demos/benchmark/screenshot2.png differ diff --git a/demos/multilang/README.md b/demos/multilang/README.md deleted file mode 100644 index 9fa792a77b5..00000000000 --- a/demos/multilang/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Keypad and Encoder demo - -## Overview - -LVGL allows you to control the widgets with keypad and/or encoder without touchpad. -This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches and text inputs without touchpad. -Learn more about the touchpad-less usage of LVGL [here](https://docs.lvgl.io/master/overview/indev.html#keypad-and-encoder). - -![Keypad and encoder navigation in LVGL embedded GUI library](screenshot1.gif) - -## Run the demo -- In `lv_conf.h` or equivalent places set `LV_USE_DEMO_KEYPAD_AND_ENCODER 1` -- After `lv_init()` and initializing the drivers call `lv_demo_keypad_encoder()` diff --git a/demos/render/README.md b/demos/render/README.md deleted file mode 100644 index 6518490edee..00000000000 --- a/demos/render/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Benchmark demo - - -![LVGL benchmark running](screenshot1.png) - -## Overview - -The benchmark demo tests the performance in various cases. -For example rectangle, border, shadow, text, image blending, image transformation, blending modes, etc. -All tests are repeated with 50% opacity. - -The size and position of the objects during testing are set with a pseudo random number to make the benchmark repeatable. - -On to top of the screen the title of the current test step, and the result of the previous step is displayed. - -## Run the benchmark -- In `lv_conf.h` or equivalent places set `LV_USE_DEMO_BENCHMARK 1` -- After `lv_init()` and initializing the drivers and call `lv_demo_benchmark(mode)` -- If you only want to run a specific scene for any purpose (e.g. debug, performance optimization etc.), you can call `lv_demo_benchmark_run_scene(mode, scene_idx)` instead of `lv_demo_benchmark()`and pass the scene number. -- If you enabled trace output by setting macro `LV_USE_LOG` to `1` and trace level `LV_LOG_LEVEL` to `LV_LOG_LEVEL_USER` or higher, benchmark results are printed out in `csv` format. - - -## Modes -The `mode` should be passed to `lv_demo_benchmark(mode)` or `lv_demo_benchmark_run_scene(mode, scene_idx)`. - -- `LV_DEMO_BENCHMARK_MODE_RENDER_AND_DRIVER` Render the scenes and show them on the display. Measure rendering time but it might contain extra time when LVGL waits for the driver. Run each scenes for a few seconds so the performance can be seen by eye too. As only the rendering time is measured and converted to FPS, really high values (e.g. 1000 FPS) are possible. -- `LV_DEMO_BENCHMARK_MODE_REAL` Similar to `RENDER_AND_DRIVER` but instead of measuring the rendering time only measure the real FPS of the system. E.g. even if a scene was rendered in 1 ms, but the screen is redrawn only in every 100 ms, the result will be 10 FPS. -- `LV_DEMO_BENCHMARK_MODE_RENDER_ONLY` Temporarily display the `flush_cb` so the pure rendering time will be measured. The display is not updated during the benchmark, only at the end when the summary table is shown. Renders a given number of frames from each scene and calculate the FPS from them. - - -## Result summary -In the end, a table is created to display measured FPS values. - -On top of the summary screen, the "Weighted FPS" value is shown. -In this, the result of the more common cases are taken into account with a higher weight. - -"Opa. speed" shows the speed of the measurements with opacity compared to full opacity. -E.g. "Opa. speed = 90%" means that rendering with opacity is 10% slower. - -In the first section of the table, "Slow but common cases", those cases are displayed which are considered common but were slower than 20 FPS. - -Below this in the "All cases section" all the results are shown. The < 10 FPS results are shown with red, the >= 10 but < 20 FPS values are displayed with orange. - -![LVGL benchmark result summary](screenshot2.png) - - - -**NOTE**: Compared to the past, the use of rotation and zoom(scaling) in GUI applications has become increasingly common. Therefore, starting from LVGL9, we have assigned a higher priority to zoom(scaling) and rotation operations. diff --git a/demos/render/screenshot1.png b/demos/render/screenshot1.png deleted file mode 100644 index 845f2be62a2..00000000000 Binary files a/demos/render/screenshot1.png and /dev/null differ diff --git a/demos/render/screenshot2.png b/demos/render/screenshot2.png deleted file mode 100644 index 0a0023b60f6..00000000000 Binary files a/demos/render/screenshot2.png and /dev/null differ diff --git a/demos/transform/README.md b/demos/transform/README.md deleted file mode 100644 index 9fa792a77b5..00000000000 --- a/demos/transform/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Keypad and Encoder demo - -## Overview - -LVGL allows you to control the widgets with keypad and/or encoder without touchpad. -This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches and text inputs without touchpad. -Learn more about the touchpad-less usage of LVGL [here](https://docs.lvgl.io/master/overview/indev.html#keypad-and-encoder). - -![Keypad and encoder navigation in LVGL embedded GUI library](screenshot1.gif) - -## Run the demo -- In `lv_conf.h` or equivalent places set `LV_USE_DEMO_KEYPAD_AND_ENCODER 1` -- After `lv_init()` and initializing the drivers call `lv_demo_keypad_encoder()`