diff --git a/demos/benchmark/lv_demo_benchmark.c b/demos/benchmark/lv_demo_benchmark.c index 4f24550f31..92a6137c0a 100644 --- a/demos/benchmark/lv_demo_benchmark.c +++ b/demos/benchmark/lv_demo_benchmark.c @@ -1006,29 +1006,9 @@ static void generate_report(void) lv_table_set_col_width(table, 1, w / 4 - 3); lv_obj_set_width(table, lv_pct(100)); - // static lv_style_t style_cell_slow; - // static lv_style_t style_cell_very_slow; - // static lv_style_t style_cell_title; - // - // lv_style_init(&style_cell_title); - // lv_style_set_bg_color(&style_cell_title, LV_STATE_DEFAULT, lv_palette_main(LV_PALETTE_GREY)); - // lv_style_set_bg_opa(&style_cell_title, LV_STATE_DEFAULT, LV_OPA_50); - // - // lv_style_init(&style_cell_slow); - // lv_style_set_text_color(&style_cell_slow, LV_STATE_DEFAULT, LV_COLOR_ORANGE); - // - // lv_style_init(&style_cell_very_slow); - // lv_style_set_text_color(&style_cell_very_slow, LV_STATE_DEFAULT, lv_palette_main(LV_PALETTE_RED)); - - // lv_obj_add_style(table, LV_TABLE_PART_CELL2, &style_cell_slow); - // lv_obj_add_style(table, LV_TABLE_PART_CELL3, &style_cell_very_slow); - // lv_obj_add_style(table, LV_TABLE_PART_CELL4, &style_cell_title); - - uint16_t row = 0; lv_table_add_cell_ctrl(table, row, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT); lv_table_set_cell_value(table, row, 0, "Slow but common cases"); - // lv_table_set_cell_type(table, row, 0, 4); LV_LOG("\r\n" "LVGL v%d.%d.%d " LVGL_VERSION_INFO @@ -1047,11 +1027,6 @@ static void generate_report(void) lv_snprintf(buf, sizeof(buf), "%"LV_PRIu32, scenes[i].fps_normal); lv_table_set_cell_value(table, row, 1, buf); - // lv_table_set_cell_type(table, row, 0, 2); - // lv_table_set_cell_type(table, row, 1, 2); - - //LV_LOG("%s,%s\r\n", scenes[i].name, buf); - row++; } @@ -1059,15 +1034,9 @@ static void generate_report(void) lv_snprintf(buf, sizeof(buf), "%s + opa", scenes[i].name); lv_table_set_cell_value(table, row, 0, buf); - //LV_LOG("%s,", buf); - lv_snprintf(buf, sizeof(buf), "%"LV_PRIu32, scenes[i].fps_opa); lv_table_set_cell_value(table, row, 1, buf); - // lv_table_set_cell_type(table, row, 0, 2); - // lv_table_set_cell_type(table, row, 1, 2); - //LV_LOG("%s\r\n", buf); - row++; } } @@ -1090,15 +1059,6 @@ static void generate_report(void) lv_snprintf(buf, sizeof(buf), "%"LV_PRIu32, scenes[i].fps_normal); lv_table_set_cell_value(table, row, 1, buf); - if(scenes[i].fps_normal < 10) { - // lv_table_set_cell_type(table, row, 0, 3); - // lv_table_set_cell_type(table, row, 1, 3); - } - else if(scenes[i].fps_normal < 20) { - // lv_table_set_cell_type(table, row, 0, 2); - // lv_table_set_cell_type(table, row, 1, 2); - } - LV_LOG("%s,%s\r\n", scenes[i].name, buf); row++; @@ -1112,21 +1072,11 @@ static void generate_report(void) lv_table_set_cell_value(table, row, 1, buf); - if(scenes[i].fps_opa < 10) { - // lv_table_set_cell_type(table, row, 0, 3); - // lv_table_set_cell_type(table, row, 1, 3); - } - else if(scenes[i].fps_opa < 20) { - // lv_table_set_cell_type(table, row, 0, 2); - // lv_table_set_cell_type(table, row, 1, 2); - } - LV_LOG("%s\r\n", buf); row++; } - // lv_page_set_scrl_layout(page, LV_LAYOUT_COLUMN_LEFT); } diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_1.c b/demos/multilang/assets/avatars/img_multilang_avatar_1.c index e0ff8eb248..023273e7a4 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_1.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_1.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_1 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_1_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_10.c b/demos/multilang/assets/avatars/img_multilang_avatar_10.c index 61624ae53c..5ef348251d 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_10.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_10.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_10 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_10_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_11.c b/demos/multilang/assets/avatars/img_multilang_avatar_11.c index e67afb3e30..4a8a03fb99 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_11.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_11.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_11 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_11_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_12.c b/demos/multilang/assets/avatars/img_multilang_avatar_12.c index 805b7e4b93..061959bbb8 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_12.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_12.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_12 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_12_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_13.c b/demos/multilang/assets/avatars/img_multilang_avatar_13.c index a3abd6c286..11f4074b78 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_13.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_13.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_13 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_13_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_14.c b/demos/multilang/assets/avatars/img_multilang_avatar_14.c index e8e152286f..0b2082be62 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_14.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_14.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_14 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_14_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_15.c b/demos/multilang/assets/avatars/img_multilang_avatar_15.c index a3023f582a..ea1c59dce0 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_15.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_15.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_15 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_15_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_16.c b/demos/multilang/assets/avatars/img_multilang_avatar_16.c index a7494f7177..fa796c748f 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_16.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_16.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_16 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_16_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_17.c b/demos/multilang/assets/avatars/img_multilang_avatar_17.c index ff6efea5be..a13b9dcb36 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_17.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_17.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_17 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_17_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_19.c b/demos/multilang/assets/avatars/img_multilang_avatar_19.c index 798a2beb3d..9326fb0ff7 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_19.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_19.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_19 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_19_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_2.c b/demos/multilang/assets/avatars/img_multilang_avatar_2.c index 52ef1d8a85..edefb6909c 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_2.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_2.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_2 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_2_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_22.c b/demos/multilang/assets/avatars/img_multilang_avatar_22.c index 8630e1e69b..1f4dd4a35e 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_22.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_22.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_22 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_22_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_25.c b/demos/multilang/assets/avatars/img_multilang_avatar_25.c index 65b890b538..ad0e9b1f9e 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_25.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_25.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_25 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_25_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_3.c b/demos/multilang/assets/avatars/img_multilang_avatar_3.c index cad6078949..6059f9fc51 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_3.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_3.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_3 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_COLOR_FORMAT_ARGB888, .data = img_multilang_avatar_3_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_4.c b/demos/multilang/assets/avatars/img_multilang_avatar_4.c index b5d2b7d216..95b4007bde 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_4.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_4.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_4 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_4_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_5.c b/demos/multilang/assets/avatars/img_multilang_avatar_5.c index 6a3e1dedeb..4cfe038542 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_5.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_5.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_5 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_5_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_6.c b/demos/multilang/assets/avatars/img_multilang_avatar_6.c index 3d3a151963..13294f4e60 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_6.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_6.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_6 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_6_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_7.c b/demos/multilang/assets/avatars/img_multilang_avatar_7.c index 8dd172babe..874f2cc476 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_7.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_7.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_7 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_7_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_8.c b/demos/multilang/assets/avatars/img_multilang_avatar_8.c index 1a7c18ee98..66deaf2d18 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_8.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_8.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_8 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_8_map, }; diff --git a/demos/multilang/assets/avatars/img_multilang_avatar_9.c b/demos/multilang/assets/avatars/img_multilang_avatar_9.c index d29be5a2bf..811d0344b6 100644 --- a/demos/multilang/assets/avatars/img_multilang_avatar_9.c +++ b/demos/multilang/assets/avatars/img_multilang_avatar_9.c @@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_9 = { .header.reserved = 0, .header.w = 128, .header.h = 128, - // .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_multilang_avatar_9_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_artist_palette.c b/demos/multilang/assets/emojis/img_emoji_artist_palette.c index aeba121f79..0e0e7faf74 100644 --- a/demos/multilang/assets/emojis/img_emoji_artist_palette.c +++ b/demos/multilang/assets/emojis/img_emoji_artist_palette.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_artist_palette = { .header.reserved = 0, .header.w = 18, .header.h = 19, - // .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_artist_palette_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_books.c b/demos/multilang/assets/emojis/img_emoji_books.c index d3c082c923..2b65e9298a 100644 --- a/demos/multilang/assets/emojis/img_emoji_books.c +++ b/demos/multilang/assets/emojis/img_emoji_books.c @@ -50,7 +50,6 @@ const lv_img_dsc_t img_emoji_books = { .header.reserved = 0, .header.w = 18, .header.h = 19, - // .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_books_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_camera_with_flash.c b/demos/multilang/assets/emojis/img_emoji_camera_with_flash.c index 407cf1351c..72f99e8bfb 100644 --- a/demos/multilang/assets/emojis/img_emoji_camera_with_flash.c +++ b/demos/multilang/assets/emojis/img_emoji_camera_with_flash.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_camera_with_flash = { .header.reserved = 0, .header.w = 18, .header.h = 19, - // .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_camera_with_flash_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_cat_face.c b/demos/multilang/assets/emojis/img_emoji_cat_face.c index 35e8e5b71b..df0d6f1ae1 100644 --- a/demos/multilang/assets/emojis/img_emoji_cat_face.c +++ b/demos/multilang/assets/emojis/img_emoji_cat_face.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_cat_face = { .header.reserved = 0, .header.w = 18, .header.h = 19, - // .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_cat_face_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_deciduous_tree.c b/demos/multilang/assets/emojis/img_emoji_deciduous_tree.c index 16f2c6ba93..7a172ea3ea 100644 --- a/demos/multilang/assets/emojis/img_emoji_deciduous_tree.c +++ b/demos/multilang/assets/emojis/img_emoji_deciduous_tree.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_deciduous_tree = { .header.reserved = 0, .header.w = 16, .header.h = 19, - // .data_size = 304 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_deciduous_tree_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_dog_face.c b/demos/multilang/assets/emojis/img_emoji_dog_face.c index 52cc5a9dcf..19a5d93ad1 100644 --- a/demos/multilang/assets/emojis/img_emoji_dog_face.c +++ b/demos/multilang/assets/emojis/img_emoji_dog_face.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_dog_face = { .header.reserved = 0, .header.w = 18, .header.h = 19, - // .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_dog_face_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_earth_globe_europe_africa.c b/demos/multilang/assets/emojis/img_emoji_earth_globe_europe_africa.c index e6e4d12ff4..663d0dbfea 100644 --- a/demos/multilang/assets/emojis/img_emoji_earth_globe_europe_africa.c +++ b/demos/multilang/assets/emojis/img_emoji_earth_globe_europe_africa.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_earth_globe_europe_africa = { .header.reserved = 0, .header.w = 19, .header.h = 19, - // .data_size = 361 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_earth_globe_europe_africa_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_flexed_biceps.c b/demos/multilang/assets/emojis/img_emoji_flexed_biceps.c index 2b7330669b..1ce678a333 100644 --- a/demos/multilang/assets/emojis/img_emoji_flexed_biceps.c +++ b/demos/multilang/assets/emojis/img_emoji_flexed_biceps.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_flexed_biceps = { .header.reserved = 0, .header.w = 18, .header.h = 19, - // .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_flexed_biceps_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_movie_camera.c b/demos/multilang/assets/emojis/img_emoji_movie_camera.c index 7e61a56507..0c0ed82d9a 100644 --- a/demos/multilang/assets/emojis/img_emoji_movie_camera.c +++ b/demos/multilang/assets/emojis/img_emoji_movie_camera.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_movie_camera = { .header.reserved = 0, .header.w = 18, .header.h = 19, - // .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_movie_camera_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_red_heart.c b/demos/multilang/assets/emojis/img_emoji_red_heart.c index 868e4665ff..c4e574b3a7 100644 --- a/demos/multilang/assets/emojis/img_emoji_red_heart.c +++ b/demos/multilang/assets/emojis/img_emoji_red_heart.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_red_heart = { .header.reserved = 0, .header.w = 18, .header.h = 19, - // .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_red_heart_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_rocket.c b/demos/multilang/assets/emojis/img_emoji_rocket.c index c7ee614765..95424fc271 100644 --- a/demos/multilang/assets/emojis/img_emoji_rocket.c +++ b/demos/multilang/assets/emojis/img_emoji_rocket.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_rocket = { .header.reserved = 0, .header.w = 16, .header.h = 19, - // .data_size = 304 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_rocket_map, }; diff --git a/demos/multilang/assets/emojis/img_emoji_soccer_ball.c b/demos/multilang/assets/emojis/img_emoji_soccer_ball.c index fb23e6ab8d..2af3b60dec 100644 --- a/demos/multilang/assets/emojis/img_emoji_soccer_ball.c +++ b/demos/multilang/assets/emojis/img_emoji_soccer_ball.c @@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_soccer_ball = { .header.reserved = 0, .header.w = 18, .header.h = 19, - // .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_emoji_soccer_ball_map, }; diff --git a/demos/music/assets/img_lv_demo_music_btn_list_pause.c b/demos/music/assets/img_lv_demo_music_btn_list_pause.c index ae42587739..b76b347f6e 100644 --- a/demos/music/assets/img_lv_demo_music_btn_list_pause.c +++ b/demos/music/assets/img_lv_demo_music_btn_list_pause.c @@ -200,7 +200,6 @@ lv_img_dsc_t img_lv_demo_music_btn_list_pause = { .header.always_zero = 0, .header.w = 58, .header.h = 60, - // .data_size = 3480 * LV_COLOR_FORMAT_NATIVE_ALPHA_SIZE, .header.cf = LV_COLOR_FORMAT_ARGB8888, .data = img_lv_demo_music_btn_list_pause_map, }; diff --git a/demos/music/lv_demo_music_main.c b/demos/music/lv_demo_music_main.c index c7974fa7c4..6c8a7924dc 100644 --- a/demos/music/lv_demo_music_main.c +++ b/demos/music/lv_demo_music_main.c @@ -409,21 +409,15 @@ static lv_obj_t * create_cont(lv_obj_t * parent) lv_obj_t * placeholder1 = lv_obj_create(main_cont); lv_obj_remove_style_all(placeholder1); lv_obj_clear_flag(placeholder1, LV_OBJ_FLAG_CLICKABLE); - // lv_obj_set_style_bg_color(placeholder1, lv_color_hex(0xff0000), 0); - // lv_obj_set_style_bg_opa(placeholder1, LV_OPA_50, 0); lv_obj_t * placeholder2 = lv_obj_create(main_cont); lv_obj_remove_style_all(placeholder2); lv_obj_clear_flag(placeholder2, LV_OBJ_FLAG_CLICKABLE); - // lv_obj_set_style_bg_color(placeholder2, lv_color_hex(0x00ff00), 0); - // lv_obj_set_style_bg_opa(placeholder2, LV_OPA_50, 0); #if LV_DEMO_MUSIC_SQUARE || LV_DEMO_MUSIC_ROUND lv_obj_t * placeholder3 = lv_obj_create(main_cont); lv_obj_remove_style_all(placeholder3); lv_obj_clear_flag(placeholder3, LV_OBJ_FLAG_CLICKABLE); - // lv_obj_set_style_bg_color(placeholder3, lv_color_hex(0x0000ff), 0); - // lv_obj_set_style_bg_opa(placeholder3, LV_OPA_20, 0); lv_obj_set_size(placeholder1, lv_pct(100), LV_VER_RES); lv_obj_set_y(placeholder1, 0); @@ -863,9 +857,6 @@ static void spectrum_draw_event_cb(lv_event_t * e) draw_dsc.p[0].x = center.x + x1_out; draw_dsc.p[0].y = center.y + get_sin(di, v); - // int32_t x1_in = get_cos(di, r_in); - // draw_dsc.p[1].x = center.x + x1_in; - // draw_dsc.p[1].y = center.y + get_sin(di, r_in); di += DEG_STEP - deg_space * 2; int32_t x2_out = get_cos(di, v); diff --git a/demos/stress/lv_demo_stress.c b/demos/stress/lv_demo_stress.c index cd11a8edd2..c129829a6f 100644 --- a/demos/stress/lv_demo_stress.c +++ b/demos/stress/lv_demo_stress.c @@ -60,8 +60,6 @@ static void obj_test_task_cb(lv_timer_t * tmr) lv_anim_t a; lv_obj_t * obj; - // printf("step start: %d\n", state); - switch(state) { case -1: { lv_res_t res = lv_mem_test(); @@ -143,13 +141,6 @@ static void obj_test_task_cb(lv_timer_t * tmr) lv_obj_set_size(obj, 100, 70); lv_obj_set_style_bg_img_src(obj, LV_SYMBOL_DUMMY"Text from\nstyle", 0); lv_obj_del_async(obj); /*Delete on next call of `lv_task_handler` (so not now)*/ - - // obj = lv_btn_create(main_page); - // lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT); - // lv_obj_set_style_bg_img_src(obj, LV_SYMBOL_LEFT); - // lv_obj_set_style_bg_img_opa(obj, LV_OPA_50); - // lv_obj_set_style_bg_img_tiled(obj, true); - // lv_obj_scroll_to_view(obj, LV_ANIM_ON); break; case 5: @@ -419,7 +410,6 @@ static void obj_test_task_cb(lv_timer_t * tmr) break; } - // printf("step end: %d\n", state); state++; } diff --git a/demos/widgets/assets/img_clothes.c b/demos/widgets/assets/img_clothes.c index af614d5ecb..453b8661b2 100644 --- a/demos/widgets/assets/img_clothes.c +++ b/demos/widgets/assets/img_clothes.c @@ -250,7 +250,6 @@ const lv_img_dsc_t img_clothes = { .header.always_zero = 0, .header.w = 56, .header.h = 56, - // .data_size = 3136 * LV_COLOR_FORMAT_NATIVE_ALPHA_SIZE, .header.cf = LV_COLOR_DEPTH == 16 ? LV_COLOR_FORMAT_RGB565A8 : LV_COLOR_FORMAT_ARGB8888, .data = img_clothes_map, }; diff --git a/demos/widgets/lv_demo_widgets.c b/demos/widgets/lv_demo_widgets.c index 3756ca8022..ee3183cb90 100644 --- a/demos/widgets/lv_demo_widgets.c +++ b/demos/widgets/lv_demo_widgets.c @@ -1492,53 +1492,6 @@ static void chart_event_cb(lv_event_t * e) static void shop_chart_event_cb(lv_event_t * e) { LV_UNUSED(e); - // lv_event_code_t code = lv_event_get_code(e); - // if(code == LV_EVENT_DRAW_PART_BEGIN) { - // lv_obj_draw_part_dsc_t * dsc = lv_event_get_param(e); - // /*Set the markers' text*/ - // if(dsc->part == LV_PART_TICKS && dsc->id == LV_CHART_AXIS_PRIMARY_X) { - // const char * month[] = {"Jan", "Febr", "March", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec"}; - // lv_snprintf(dsc->text, dsc->text_length, "%s", month[dsc->value]); - // } - // if(dsc->part == LV_PART_ITEMS) { - // dsc->rect_dsc->bg_opa = LV_OPA_TRANSP; /*We will draw it later*/ - // } - // } - // if(code == LV_EVENT_DRAW_PART_END) { - // lv_obj_draw_part_dsc_t * dsc = lv_event_get_param(e); - // /*Add the faded area before the lines are drawn */ - // if(dsc->part == LV_PART_ITEMS) { - // static const uint32_t devices[10] = {32, 43, 21, 56, 29, 36, 19, 25, 62, 35}; - // static const uint32_t clothes[10] = {12, 19, 23, 31, 27, 32, 32, 11, 21, 32}; - // static const uint32_t services[10] = {56, 38, 56, 13, 44, 32, 49, 64, 17, 33}; - // - // lv_draw_rect_dsc_t draw_rect_dsc; - // lv_draw_rect_dsc_init(&draw_rect_dsc); - // - // lv_coord_t h = lv_area_get_height(dsc->draw_area); - // - // lv_area_t a; - // a.x1 = dsc->draw_area->x1; - // a.x2 = dsc->draw_area->x2; - // - // a.y1 = dsc->draw_area->y1; - // a.y2 = a.y1 + 4 + (devices[dsc->id] * h) / 100; /*+4 to overlap the radius*/ - // draw_rect_dsc.bg_color = lv_palette_main(LV_PALETTE_RED); - // draw_rect_dsc.radius = 4; - // lv_draw_rect(dsc->layer, &draw_rect_dsc, &a); - // - // a.y1 = a.y2 - 4; /*-4 to overlap the radius*/ - // a.y2 = a.y1 + (clothes[dsc->id] * h) / 100; - // draw_rect_dsc.bg_color = lv_palette_main(LV_PALETTE_BLUE); - // draw_rect_dsc.radius = 0; - // lv_draw_rect(dsc->layer, &draw_rect_dsc, &a); - // - // a.y1 = a.y2; - // a.y2 = a.y1 + (services[dsc->id] * h) / 100; - // draw_rect_dsc.bg_color = lv_palette_main(LV_PALETTE_GREEN); - // lv_draw_rect(dsc->layer, &draw_rect_dsc, &a); - // } - // } } diff --git a/examples/assets/imgbtn_mid.c b/examples/assets/imgbtn_mid.c index 5a2fd89a93..28b8b0ed3b 100644 --- a/examples/assets/imgbtn_mid.c +++ b/examples/assets/imgbtn_mid.c @@ -173,7 +173,6 @@ const lv_img_dsc_t imgbtn_mid = { .header.always_zero = 0, .header.w = 5, .header.h = 49, - // .data_size = 245 * LV_COLOR_FORMAT_NATIVE_ALPHA_SIZE, .header.cf = LV_COLOR_FORMAT_ARGB8888, .data = imgbtn_mid_map, }; diff --git a/examples/libs/bmp/lv_example_bmp_1.c b/examples/libs/bmp/lv_example_bmp_1.c index 42127f0c4d..9bead1d0f4 100644 --- a/examples/libs/bmp/lv_example_bmp_1.c +++ b/examples/libs/bmp/lv_example_bmp_1.c @@ -9,11 +9,7 @@ void lv_example_bmp_1(void) lv_obj_t * img = lv_img_create(lv_scr_act()); /* Assuming a File system is attached to letter 'A' * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ - //#if LV_COLOR_DEPTH == 32 lv_img_set_src(img, "A:lvgl/examples/libs/bmp/example_32bit.bmp"); - //#elif LV_COLOR_DEPTH == 16 - // lv_img_set_src(img, "A:lvgl/examples/libs/bmp/example_16bit.bmp"); - //#endif lv_obj_center(img); } diff --git a/examples/others/file_explorer/lv_example_file_explorer_1.c b/examples/others/file_explorer/lv_example_file_explorer_1.c index 745e38de97..4126e34be2 100644 --- a/examples/others/file_explorer/lv_example_file_explorer_1.c +++ b/examples/others/file_explorer/lv_example_file_explorer_1.c @@ -53,7 +53,7 @@ void lv_example_file_explorer_1(void) char * envvar = "HOME"; char home_dir[LV_FS_MAX_PATH_LENGTH]; strcpy(home_dir, "A:"); - // get the user's home directory from the HOME enviroment variable + /* get the user's home directory from the HOME enviroment variable*/ strcat(home_dir, getenv(envvar)); LV_LOG_USER("home_dir: %s\n", home_dir); lv_file_explorer_set_quick_access_path(file_explorer, LV_EXPLORER_HOME_DIR, home_dir); diff --git a/examples/others/file_explorer/lv_example_file_explorer_2.c b/examples/others/file_explorer/lv_example_file_explorer_2.c index 5a813aa59f..949aa9ef5e 100644 --- a/examples/others/file_explorer/lv_example_file_explorer_2.c +++ b/examples/others/file_explorer/lv_example_file_explorer_2.c @@ -83,7 +83,7 @@ void lv_example_file_explorer_2(void) char * envvar = "HOME"; char home_dir[LV_FS_MAX_PATH_LENGTH]; strcpy(home_dir, "A:"); - // get the user's home directory from the HOME enviroment variable + /* get the user's home directory from the HOME enviroment variable*/ strcat(home_dir, getenv(envvar)); LV_LOG_USER("home_dir: %s\n", home_dir); lv_file_explorer_set_quick_access_path(file_explorer, LV_EXPLORER_HOME_DIR, home_dir); @@ -135,7 +135,6 @@ void lv_example_file_explorer_2(void) lv_obj_set_size(dd, LV_PCT(30), LV_SIZE_CONTENT); lv_dropdown_set_options_static(dd, opts); lv_obj_align(dd, LV_ALIGN_RIGHT_MID, 0, 0); - //lv_obj_align_to(dd, btn, LV_ALIGN_OUT_RIGHT_MID, 0, 0); lv_obj_add_event(dd, dd_event_handler, LV_EVENT_VALUE_CHANGED, file_explorer); } diff --git a/examples/others/file_explorer/lv_example_file_explorer_3.c b/examples/others/file_explorer/lv_example_file_explorer_3.c index cf1c03f561..5d4613b4cf 100644 --- a/examples/others/file_explorer/lv_example_file_explorer_3.c +++ b/examples/others/file_explorer/lv_example_file_explorer_3.c @@ -97,7 +97,7 @@ void lv_example_file_explorer_3(void) char * envvar = "HOME"; char home_dir[LV_FS_MAX_PATH_LENGTH]; strcpy(home_dir, "A:"); - // get the user's home directory from the HOME enviroment variable + /* get the user's home directory from the HOME enviroment variable*/ strcat(home_dir, getenv(envvar)); LV_LOG_USER("home_dir: %s\n", home_dir); lv_file_explorer_set_quick_access_path(file_explorer, LV_EXPLORER_HOME_DIR, home_dir); diff --git a/examples/styles/lv_example_style_5.c b/examples/styles/lv_example_style_5.c index 8bc8afbe64..0f80f4ae29 100644 --- a/examples/styles/lv_example_style_5.c +++ b/examples/styles/lv_example_style_5.c @@ -17,8 +17,6 @@ void lv_example_style_5(void) /*Add a shadow*/ lv_style_set_shadow_width(&style, 55); lv_style_set_shadow_color(&style, lv_palette_main(LV_PALETTE_BLUE)); - // lv_style_set_shadow_ofs_x(&style, 10); - // lv_style_set_shadow_ofs_y(&style, 20); /*Create an object with the new style*/ lv_obj_t * obj = lv_obj_create(lv_scr_act()); diff --git a/src/core/lv_obj.c b/src/core/lv_obj.c index b70bbd7c7f..e5307fc71a 100644 --- a/src/core/lv_obj.c +++ b/src/core/lv_obj.c @@ -720,7 +720,6 @@ static void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state) lv_free(ts); if(cmp_res == _LV_STYLE_STATE_CMP_DIFF_REDRAW) { - // lv_obj_invalidate(obj); /*Invalidation is not enough, e.g. layer type needs to be updated too*/ lv_obj_refresh_style(obj, LV_PART_ANY, LV_STYLE_PROP_ANY); } diff --git a/src/core/lv_refr.c b/src/core/lv_refr.c index 0ea291f91a..29df2c0d5a 100644 --- a/src/core/lv_refr.c +++ b/src/core/lv_refr.c @@ -891,7 +891,7 @@ static void draw_buf_flush(lv_disp_t * disp) { /*Flush the rendered content to the display*/ lv_layer_t * layer = disp->layer_head; - // if(layer->wait_for_finish) layer->wait_for_finish(layer); + while(layer->draw_task_head) { lv_draw_dispatch_wait_for_request(); lv_draw_dispatch(); diff --git a/src/dev/disp/fb/lv_linux_fbdev.c b/src/dev/disp/fb/lv_linux_fbdev.c index a185551c7f..09ff2ce12a 100644 --- a/src/dev/disp/fb/lv_linux_fbdev.c +++ b/src/dev/disp/fb/lv_linux_fbdev.c @@ -122,7 +122,7 @@ void lv_linux_fbdev_set_file(lv_disp_t * disp, const char * file) if(dsc->fbfd > 0) close(dsc->fbfd); - // Open the file for reading and writing + /* Open the file for reading and writing*/ dsc->fbfd = open(dsc->devname, O_RDWR); if(dsc->fbfd == -1) { perror("Error: cannot open framebuffer device"); @@ -131,10 +131,10 @@ void lv_linux_fbdev_set_file(lv_disp_t * disp, const char * file) LV_LOG_INFO("The framebuffer device was opened successfully"); #if !LV_LINUX_FBDEV_NUTTX - // Make sure that the display is on. + /* Make sure that the display is on.*/ if(ioctl(dsc->fbfd, FBIOBLANK, FB_BLANK_UNBLANK) != 0) { perror("ioctl(FBIOBLANK)"); - // Don't return. Some framebuffer drivers like efifb or simplefb don't implement FBIOBLANK. + /* Don't return. Some framebuffer drivers like efifb or simplefb don't implement FBIOBLANK.*/ } #endif /* !LV_LINUX_FBDEV_NUTTX */ @@ -142,13 +142,13 @@ void lv_linux_fbdev_set_file(lv_disp_t * disp, const char * file) struct fbtype fb; unsigned line_length; - //Get fb type + /*Get fb type*/ if(ioctl(dsc->fbfd, FBIOGTYPE, &fb) != 0) { perror("ioctl(FBIOGTYPE)"); return; } - //Get screen width + /*Get screen width*/ if(ioctl(dsc->fbfd, FBIO_GETLINEWIDTH, &line_length) != 0) { perror("ioctl(FBIO_GETLINEWIDTH)"); return; @@ -163,13 +163,13 @@ void lv_linux_fbdev_set_file(lv_disp_t * disp, const char * file) dsc->finfo.smem_len = dsc->finfo.line_length * dsc->vinfo.yres; #else /* LV_LINUX_FBDEV_BSD */ - // Get fixed screen information + /* Get fixed screen information*/ if(ioctl(dsc->fbfd, FBIOGET_FSCREENINFO, &dsc->finfo) == -1) { perror("Error reading fixed information"); return; } - // Get variable screen information + /* Get variable screen information*/ if(ioctl(dsc->fbfd, FBIOGET_VSCREENINFO, &dsc->vinfo) == -1) { perror("Error reading variable information"); return; @@ -178,18 +178,18 @@ void lv_linux_fbdev_set_file(lv_disp_t * disp, const char * file) LV_LOG_INFO("%dx%d, %dbpp", dsc->vinfo.xres, dsc->vinfo.yres, dsc->vinfo.bits_per_pixel); - // Figure out the size of the screen in bytes + /* Figure out the size of the screen in bytes*/ dsc->screensize = dsc->finfo.smem_len; //finfo.line_length * vinfo.yres; - // Map the device to memory + /* Map the device to memory*/ dsc->fbp = (char *)mmap(0, dsc->screensize, PROT_READ | PROT_WRITE, MAP_SHARED, dsc->fbfd, 0); if((intptr_t)dsc->fbp == -1) { perror("Error: failed to map framebuffer device to memory"); return; } - // Don't initialise the memory to retain what's currently displayed / avoid clearing the screen. - // This is important for applications that only draw to a subsection of the full framebuffer. + /* Don't initialise the memory to retain what's currently displayed / avoid clearing the screen. + * This is important for applications that only draw to a subsection of the full framebuffer.*/ LV_LOG_INFO("The framebuffer device was mapped to memory successfully"); @@ -257,7 +257,7 @@ static void flush_cb(lv_disp_t * disp, const lv_area_t * area, uint8_t * color_p } #if LV_LINUX_FBDEV_NUTTX && defined(CONFIG_FB_UPDATE) - //May be some direct update command is required + /*May be some direct update command is required*/ struct fb_area_s fb_area; fb_area.x = area->x1; fb_area.y = area->y1; diff --git a/src/dev/sdl/lv_sdl_mousewheel.c b/src/dev/sdl/lv_sdl_mousewheel.c index 500bc33706..86797c601c 100644 --- a/src/dev/sdl/lv_sdl_mousewheel.c +++ b/src/dev/sdl/lv_sdl_mousewheel.c @@ -100,8 +100,6 @@ void _lv_sdl_mousewheel_handler(SDL_Event * event) switch(event->type) { case SDL_MOUSEWHEEL: - // Scroll down (y = -1) means positive encoder turn, - // so invert it #ifdef __EMSCRIPTEN__ /*Escripten scales it wrong*/ if(event->wheel.y < 0) dsc->diff++; diff --git a/src/draw/sw/lv_draw_sw.c b/src/draw/sw/lv_draw_sw.c index fb2adfd601..5af4c266c1 100644 --- a/src/draw/sw/lv_draw_sw.c +++ b/src/draw/sw/lv_draw_sw.c @@ -184,71 +184,6 @@ static void lv_draw_sw_buffer_copy(lv_layer_t * layer, static void lv_draw_sw_buffer_convert(lv_layer_t * layer) { LV_UNUSED(layer); - //TODO - // /*Keep the rendered image as it is*/ - // if(layer->color_format == LV_COLOR_FORMAT_NATIVE) return; - // - //#if LV_COLOR_DEPTH == 8 - // if(layer->color_format == LV_COLOR_FORMAT_L8) return; - //#endif - // - //#if LV_COLOR_DEPTH == 16 - // if(layer->color_format == LV_COLOR_FORMAT_RGB565) return; - // - // /*Make both the clip and buf area relative to the buf area*/ - // if(layer->color_format == LV_COLOR_FORMAT_NATIVE_REVERSED) { - // uint32_t px_cnt = lv_area_get_size(layer->buf_area); - // uint32_t u32_cnt = px_cnt / 2; - // uint16_t * buf16 = layer->buf; - // uint32_t * buf32 = (uint32_t *) buf16 ; - // - // /*Swap all byte pairs*/ - // while(u32_cnt >= 8) { - // buf32[0] = ((uint32_t)(buf32[0] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[0] & 0x00ff00ff) << 8); - // buf32[1] = ((uint32_t)(buf32[1] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[1] & 0x00ff00ff) << 8); - // buf32[2] = ((uint32_t)(buf32[2] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[2] & 0x00ff00ff) << 8); - // buf32[3] = ((uint32_t)(buf32[3] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[3] & 0x00ff00ff) << 8); - // buf32[4] = ((uint32_t)(buf32[4] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[4] & 0x00ff00ff) << 8); - // buf32[5] = ((uint32_t)(buf32[5] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[5] & 0x00ff00ff) << 8); - // buf32[6] = ((uint32_t)(buf32[6] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[6] & 0x00ff00ff) << 8); - // buf32[7] = ((uint32_t)(buf32[7] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[7] & 0x00ff00ff) << 8); - // buf32 += 8; - // u32_cnt -= 8; - // } - // - // while(u32_cnt) { - // *buf32 = ((uint32_t)(*buf32 & 0xff00ff00) >> 8) + ((uint32_t)(*buf32 & 0x00ff00ff) << 8); - // buf32++; - // u32_cnt--; - // } - // - // if(px_cnt & 0x1) { - // uint32_t e = px_cnt - 1; - // buf16[e] = ((buf16[e] & 0xff00) >> 8) + ((buf16[e] & 0x00ff) << 8); - // } - // - // return; - // } - //#endif - // - // size_t buf_size_px = lv_area_get_size(&layer->buf_area); - // - // bool has_alpha = lv_color_format_has_alpha(layer->color_format); - // uint8_t px_size_in = lv_color_format_get_size(layer->color_format); - // uint8_t px_size_out = lv_color_format_get_size(display->color_format); - // - // /*In-plpace conversation can happen only when converting to a smaller pixel size*/ - // if(px_size_in >= px_size_out) { - // if(has_alpha) lv_color_from_native_alpha(layer->buf, layer->buf, layer->color_format, buf_size_px); - // else lv_color_convert_from_native(layer->buf, layer->buf, layer->color_format, buf_size_px); - // } - // else { - // /*TODO What to to do when can't perform in-place conversion?*/ - // LV_LOG_WARN("Can't convert to the desired color format (%d)", layer->color_format); - // } - // return; - // - // LV_LOG_WARN("Couldn't convert the image to the desired format"); } uint8_t * buf_tmp; diff --git a/src/draw/sw/lv_draw_sw.h b/src/draw/sw/lv_draw_sw.h index e33995b718..3acb98ddde 100644 --- a/src/draw/sw/lv_draw_sw.h +++ b/src/draw/sw/lv_draw_sw.h @@ -33,7 +33,6 @@ typedef struct { lv_draw_unit_t base_unit; struct _lv_draw_task_t * task_act; #if LV_USE_OS - // lv_mutex_t mutex; lv_thread_sync_t sync; lv_thread_t thread; #endif diff --git a/src/draw/sw/lv_draw_sw_mask.c b/src/draw/sw/lv_draw_sw_mask.c index ed27bd3bae..6c41542249 100644 --- a/src/draw/sw/lv_draw_sw_mask.c +++ b/src/draw/sw/lv_draw_sw_mask.c @@ -1306,7 +1306,7 @@ LV_ATTRIBUTE_FAST_MEM static inline lv_opa_t mask_mix(lv_opa_t mask_act, lv_opa_ if(mask_new >= LV_OPA_MAX) return mask_act; if(mask_new <= LV_OPA_MIN) return 0; - return LV_UDIV255(mask_act * mask_new);// >> 8); + return LV_UDIV255(mask_act * mask_new); } diff --git a/src/draw/sw/lv_draw_sw_transform.c b/src/draw/sw/lv_draw_sw_transform.c index 5f6f2e323b..2bc3f912f2 100644 --- a/src/draw/sw/lv_draw_sw_transform.c +++ b/src/draw/sw/lv_draw_sw_transform.c @@ -49,10 +49,6 @@ typedef struct { static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int32_t yin, int32_t * xout, int32_t * yout); -//static void rgb_no_aa_chroma_key(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, -// int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, -// int32_t x_end, lv_color_t * cbuf, uint8_t * abuf, lv_color_t chroma_key_color); - static void tranform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size); diff --git a/src/font/lv_font_fmt_txt.c b/src/font/lv_font_fmt_txt.c index 7f869b03c0..2aed1cb6f8 100644 --- a/src/font/lv_font_fmt_txt.c +++ b/src/font/lv_font_fmt_txt.c @@ -233,9 +233,6 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *)font->dsc; - /*Check the cache first*/ - // if(fdsc->cache && letter == fdsc->cache->last_letter) return fdsc->cache->last_glyph_id; - uint16_t i; for(i = 0; i < fdsc->cmap_num; i++) { @@ -272,18 +269,9 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) } } - /*Update the cache*/ - // if(fdsc->cache) { - // fdsc->cache->last_letter = letter; - // fdsc->cache->last_glyph_id = glyph_id; - // } return glyph_id; } - // if(fdsc->cache) { - // fdsc->cache->last_letter = letter; - // fdsc->cache->last_glyph_id = 0; - // } return 0; } diff --git a/src/libs/gif/gifdec.c b/src/libs/gif/gifdec.c index 4053e1db25..4fe31c1095 100644 --- a/src/libs/gif/gifdec.c +++ b/src/libs/gif/gifdec.c @@ -600,15 +600,6 @@ gd_get_frame(gd_GIF * gif) void gd_render_frame(gd_GIF * gif, uint8_t * buffer) { - // uint32_t i; - // uint32_t j; - // for(i = 0, j = 0; i < gif->width * gif->height * 3; i+= 3, j+=4) { - // buffer[j + 0] = gif->canvas[i + 2]; - // buffer[j + 1] = gif->canvas[i + 1]; - // buffer[j + 2] = gif->canvas[i + 0]; - // buffer[j + 3] = 0xFF; - // } - // memcpy(buffer, gif->canvas, gif->width * gif->height * 3); render_frame_rect(gif, buffer); } diff --git a/src/libs/tiny_ttf/lv_tiny_ttf.c b/src/libs/tiny_ttf/lv_tiny_ttf.c index 360f96bde8..b03b446443 100644 --- a/src/libs/tiny_ttf/lv_tiny_ttf.c +++ b/src/libs/tiny_ttf/lv_tiny_ttf.c @@ -119,7 +119,7 @@ static void * ttf_cache_add(ttf_cache_handle_t handle, int key, int size) } } while(cache->total_size > 0 && (cache->max_size < cache->total_size + size)) { - // expire entries + /* expire entries*/ unsigned long long oldest = ttf_cache_get_oldest_age(handle); if(oldest == 0) { break; @@ -216,7 +216,7 @@ static void ttf_cache_destroy(ttf_cache_handle_t handle) TTF_CACHE_FREE((ttf_cache_t *)handle); } #if LV_TINY_TTF_FILE_SUPPORT !=0 -// a hydra stream that can be in memory or from a file +/* a hydra stream that can be in memory or from a file*/ typedef struct ttf_cb_stream { lv_fs_file_t * file; const void * data; diff --git a/src/libs/tiny_ttf/lv_tiny_ttf.h b/src/libs/tiny_ttf/lv_tiny_ttf.h index 42f32c073b..5eeb61a921 100644 --- a/src/libs/tiny_ttf/lv_tiny_ttf.h +++ b/src/libs/tiny_ttf/lv_tiny_ttf.h @@ -29,23 +29,23 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ #if LV_TINY_TTF_FILE_SUPPORT !=0 -// create a font from the specified file or path with the specified line height. +/* create a font from the specified file or path with the specified line height.*/ lv_font_t * lv_tiny_ttf_create_file(const char * path, lv_coord_t line_height); -// create a font from the specified file or path with the specified line height with the specified cache size. +/* create a font from the specified file or path with the specified line height with the specified cache size.*/ lv_font_t * lv_tiny_ttf_create_file_ex(const char * path, lv_coord_t line_height, size_t cache_size); #endif -// create a font from the specified data pointer with the specified line height. +/* create a font from the specified data pointer with the specified line height.*/ lv_font_t * lv_tiny_ttf_create_data(const void * data, size_t data_size, lv_coord_t line_height); -// create a font from the specified data pointer with the specified line height and the specified cache size. +/* create a font from the specified data pointer with the specified line height and the specified cache size.*/ lv_font_t * lv_tiny_ttf_create_data_ex(const void * data, size_t data_size, lv_coord_t line_height, size_t cache_size); -// set the size of the font to a new line_height +/* set the size of the font to a new line_height*/ void lv_tiny_ttf_set_size(lv_font_t * font, lv_coord_t line_height); -// destroy a font previously created with lv_tiny_ttf_create_xxxx() +/* destroy a font previously created with lv_tiny_ttf_create_xxxx()*/ void lv_tiny_ttf_destroy(lv_font_t * font); /********************** diff --git a/src/others/msg/lv_msg.c b/src/others/msg/lv_msg.c index e8082ddab2..6d36ceb549 100644 --- a/src/others/msg/lv_msg.c +++ b/src/others/msg/lv_msg.c @@ -182,7 +182,7 @@ static void notify(lv_msg_t * m) if(!s->_checked) { /*Check if this sub_dsc_t is about this msg_id*/ if(s->msg_id == m->id && s->callback) { - // Set this flag and notify + /* Set this flag and notify*/ s->_checked = 1; m->user_data = s->user_data; m->_priv_data = s->_priv_data; diff --git a/src/widgets/animimg/lv_animimg.c b/src/widgets/animimg/lv_animimg.c index 6c21bf2f5b..2b0ab59d22 100644 --- a/src/widgets/animimg/lv_animimg.c +++ b/src/widgets/animimg/lv_animimg.c @@ -144,7 +144,8 @@ static void lv_animimg_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob animimg->dsc = NULL; animimg->pic_count = -1; - //initial animation + + /*initial animation*/ lv_anim_init(&animimg->anim); lv_anim_set_var(&animimg->anim, obj); lv_anim_set_time(&animimg->anim, 30); diff --git a/src/widgets/canvas/lv_canvas.c b/src/widgets/canvas/lv_canvas.c index 074f5ff549..567a207fe4 100644 --- a/src/widgets/canvas/lv_canvas.c +++ b/src/widgets/canvas/lv_canvas.c @@ -228,225 +228,6 @@ void lv_canvas_copy_buf(lv_obj_t * obj, const void * to_copy, lv_coord_t x, lv_c } } -void lv_canvas_blur_hor(lv_obj_t * obj, const lv_area_t * area, uint16_t r) -{ - LV_ASSERT_OBJ(obj, MY_CLASS); - LV_UNUSED(obj); - LV_UNUSED(area); - LV_UNUSED(r); - // - // if(r == 0) return; - // - // lv_canvas_t * canvas = (lv_canvas_t *)obj; - // - // lv_area_t a; - // if(area) { - // lv_area_copy(&a, area); - // if(a.x1 < 0) a.x1 = 0; - // if(a.y1 < 0) a.y1 = 0; - // if(a.x2 > canvas->dsc.header.w - 1) a.x2 = canvas->dsc.header.w - 1; - // if(a.y2 > canvas->dsc.header.h - 1) a.y2 = canvas->dsc.header.h - 1; - // } - // else { - // a.x1 = 0; - // a.y1 = 0; - // a.x2 = canvas->dsc.header.w - 1; - // a.y2 = canvas->dsc.header.h - 1; - // } - // - // lv_color_t color = lv_obj_get_style_img_recolor(obj, LV_PART_MAIN); - // - // uint16_t r_back = r / 2; - // uint16_t r_front = r / 2; - // - // if((r & 0x1) == 0) r_back--; - // - // bool has_alpha = lv_color_format_has_alpha(canvas->dsc.header.cf); - // - // lv_coord_t line_w = lv_img_buf_get_img_size(canvas->dsc.header.w, 1, canvas->dsc.header.cf); - // uint8_t * line_buf = lv_malloc(line_w); - // - // lv_img_dsc_t line_img; - // line_img.data = line_buf; - // line_img.header.always_zero = 0; - // line_img.header.w = canvas->dsc.header.w; - // line_img.header.h = 1; - // line_img.header.cf = canvas->dsc.header.cf; - // - // lv_coord_t x; - // lv_coord_t y; - // lv_coord_t x_safe; - // - // for(y = a.y1; y <= a.y2; y++) { - // /*Initialize the buffers*/ - // uint32_t asum = 0; - // uint32_t rsum = 0; - // uint32_t gsum = 0; - // uint32_t bsum = 0; - // - // lv_color_t c; - // lv_opa_t opa = LV_OPA_TRANSP; - // lv_memcpy(line_buf, &canvas->dsc.data[y * line_w], line_w); - // - // for(x = a.x1 - r_back; x <= a.x1 + r_front; x++) { - // x_safe = x < 0 ? 0 : x; - // x_safe = x_safe > canvas->dsc.header.w - 1 ? canvas->dsc.header.w - 1 : x_safe; - // - // lv_canvas_get_px(obj, x_safe, 0, &c, &opa); - // - // rsum += c.red; - // gsum += c.green; - // bsum += c.blue; - // if(has_alpha) asum += opa; - // } - // - // /*Just to indicate that the px is visible*/ - // if(has_alpha == false) asum = LV_OPA_COVER; - // - // /*Blur all pixels of the line*/ - // for(x = a.x1; x <= a.x2; x++) { - // if(asum) { - // c.red = rsum / r; - // c.green = gsum / r; - // c.blue = bsum / r; - // if(has_alpha) opa = asum / r; - // - // lv_canvas_set_px(&canvas->dsc, x, y, c, opa); - // } - // - // x_safe = x - r_back; - // x_safe = x_safe < 0 ? 0 : x_safe; - // lv_canvas_get_px(obj, x_safe, 0, &c, &opa); - // - // rsum -= c.red; - // gsum -= c.green; - // bsum -= c.blue; - // if(has_alpha) asum -= opa; - // - // x_safe = x + 1 + r_front; - // x_safe = x_safe > canvas->dsc.header.w - 1 ? canvas->dsc.header.w - 1 : x_safe; - // lv_canvas_get_px(obj, x_safe, 0, &c, &opa); - // - // rsum += c.red; - // gsum += c.green; - // bsum += c.blue; - // if(has_alpha) asum += opa; - // } - // } - // lv_obj_invalidate(obj); - // - // lv_free(line_buf); -} - -void lv_canvas_blur_ver(lv_obj_t * obj, const lv_area_t * area, uint16_t r) -{ - LV_ASSERT_OBJ(obj, MY_CLASS); - LV_UNUSED(obj); - LV_UNUSED(area); - LV_UNUSED(r); - - // if(r == 0) return; - // - // lv_canvas_t * canvas = (lv_canvas_t *)obj; - // - // lv_area_t a; - // if(area) { - // lv_area_copy(&a, area); - // if(a.x1 < 0) a.x1 = 0; - // if(a.y1 < 0) a.y1 = 0; - // if(a.x2 > canvas->dsc.header.w - 1) a.x2 = canvas->dsc.header.w - 1; - // if(a.y2 > canvas->dsc.header.h - 1) a.y2 = canvas->dsc.header.h - 1; - // } - // else { - // a.x1 = 0; - // a.y1 = 0; - // a.x2 = canvas->dsc.header.w - 1; - // a.y2 = canvas->dsc.header.h - 1; - // } - // - // lv_color_t color = lv_obj_get_style_img_recolor(obj, LV_PART_MAIN); - // - // uint16_t r_back = r / 2; - // uint16_t r_front = r / 2; - // - // if((r & 0x1) == 0) r_back--; - // - // bool has_alpha = lv_color_format_has_alpha(canvas->dsc.header.cf); - // - // lv_coord_t x; - // lv_coord_t y; - // lv_coord_t y_safe; - // - // for(x = a.x1; x <= a.x2; x++) { - // uint32_t asum = 0; - // uint32_t rsum = 0; - // uint32_t gsum = 0; - // uint32_t bsum = 0; - // - // lv_color_t c; - // lv_opa_t opa = LV_OPA_COVER; - // - // for(y = a.y1 - r_back; y <= a.y1 + r_front; y++) { - // y_safe = y < 0 ? 0 : y; - // y_safe = y_safe > canvas->dsc.header.h - 1 ? canvas->dsc.header.h - 1 : y_safe; - // - //// c = canvas->dsc[x_safe]; - // - //// c = lv_img_buf_get_px_color(&canvas->dsc, x, y_safe, color); - //// if(has_alpha) opa = lv_img_buf_get_px_alpha(&canvas->dsc, x, y_safe); - // - //// lv_img_buf_set_px_color(&line_img, 0, y_safe, c); - //// if(has_alpha) lv_img_buf_set_px_alpha(&line_img, 0, y_safe, opa); - // - // rsum += c.red; - // gsum += c.green; - // bsum += c.blue; - // if(has_alpha) asum += opa; - // } - // - // /*Just to indicate that the px is visible*/ - // if(has_alpha == false) asum = LV_OPA_COVER; - // - // for(y = a.y1; y <= a.y2; y++) { - // if(asum) { - // c.red = rsum / r; - // c.green = gsum / r; - // c.blue = bsum / r; - // if(has_alpha) opa = asum / r; - // - // lv_img_buf_set_px_color(&canvas->dsc, x, y, c); - // } - // if(has_alpha) lv_img_buf_set_px_alpha(&canvas->dsc, x, y, opa); - // - // y_safe = y - r_back; - // y_safe = y_safe < 0 ? 0 : y_safe; - //// c = lv_img_buf_get_px_color(&line_img, 0, y_safe, color); - //// if(has_alpha) opa = lv_img_buf_get_px_alpha(&line_img, 0, y_safe); - // - // rsum -= c.red; - // gsum -= c.green; - // bsum -= c.blue; - // if(has_alpha) asum -= opa; - // - // y_safe = y + 1 + r_front; - // y_safe = y_safe > canvas->dsc.header.h - 1 ? canvas->dsc.header.h - 1 : y_safe; - // - //// c = lv_img_buf_get_px_color(&canvas->dsc, x, y_safe, color); - //// if(has_alpha) opa = lv_img_buf_get_px_alpha(&canvas->dsc, x, y_safe); - // - //// lv_img_buf_set_px_color(&line_img, 0, y_safe, c); - //// if(has_alpha) lv_img_buf_set_px_alpha(&line_img, 0, y_safe, opa); - // - // rsum += c.red; - // gsum += c.green; - // bsum += c.blue; - // if(has_alpha) asum += opa; - // } - // } - // - // lv_obj_invalidate(obj); -} - void lv_canvas_fill_bg(lv_obj_t * obj, lv_color_t color, lv_opa_t opa) { LV_ASSERT_OBJ(obj, MY_CLASS); diff --git a/src/widgets/canvas/lv_canvas.h b/src/widgets/canvas/lv_canvas.h index 0cbeeb577d..f1d247a71b 100644 --- a/src/widgets/canvas/lv_canvas.h +++ b/src/widgets/canvas/lv_canvas.h @@ -108,23 +108,6 @@ lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas); */ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h); - -/** - * Apply horizontal blur on the canvas - * @param canvas pointer to a canvas object - * @param area the area to blur. If `NULL` the whole canvas will be blurred. - * @param r radius of the blur - */ -void lv_canvas_blur_hor(lv_obj_t * canvas, const lv_area_t * area, uint16_t r); - -/** - * Apply vertical blur on the canvas - * @param canvas pointer to a canvas object - * @param area the area to blur. If `NULL` the whole canvas will be blurred. - * @param r radius of the blur - */ -void lv_canvas_blur_ver(lv_obj_t * canvas, const lv_area_t * area, uint16_t r); - /** * Fill the canvas with color * @param canvas pointer to a canvas diff --git a/src/widgets/chart/lv_chart.c b/src/widgets/chart/lv_chart.c index 83f0e40dea..4850830904 100644 --- a/src/widgets/chart/lv_chart.c +++ b/src/widgets/chart/lv_chart.c @@ -300,7 +300,6 @@ void lv_chart_get_point_pos_by_id(lv_obj_t * obj, lv_chart_series_t * ser, uint1 LV_PART_MAIN) * chart->zoom_x) >> 8; /*Gap between the column on ~adjacent X*/ lv_coord_t block_w = (w - ((chart->point_cnt - 1) * block_gap)) / chart->point_cnt; lv_coord_t col_w = (block_w - (ser_cnt - 1) * ser_gap) / ser_cnt; - // p_out->x = (int32_t)((int32_t)w * id) / chart->point_cnt; p_out->x = (int32_t)((int32_t)(w - block_w) * id) / (chart->point_cnt - 1); lv_chart_series_t * ser_i = NULL; diff --git a/src/widgets/list/lv_list.c b/src/widgets/list/lv_list.c index 9c33128ada..8fa520c9e3 100644 --- a/src/widgets/list/lv_list.c +++ b/src/widgets/list/lv_list.c @@ -68,11 +68,6 @@ lv_obj_t * lv_list_add_text(lv_obj_t * list, const char * txt) LV_LOG_INFO("begin"); lv_obj_t * obj = lv_label_create(list); lv_label_set_text(obj, txt); - // lv_obj_t * obj = lv_obj_class_create_obj(&lv_list_text_class, list); - // lv_obj_class_init_obj(obj); - // lv_label_set_text(obj, txt); - // lv_label_set_long_mode(obj, LV_LABEL_LONG_SCROLL_CIRCULAR); - // lv_obj_set_width(obj, LV_PCT(100)); return obj; } diff --git a/src/widgets/spinbox/lv_spinbox.h b/src/widgets/spinbox/lv_spinbox.h index bd9a9fd2b4..c969a74f55 100644 --- a/src/widgets/spinbox/lv_spinbox.h +++ b/src/widgets/spinbox/lv_spinbox.h @@ -41,8 +41,8 @@ typedef struct { int32_t step; uint16_t digit_count : 4; uint16_t dec_point_pos : 4; /*if 0, there is no separator and the number is an integer*/ - uint16_t rollover : 1; // Set to true for rollover functionality - uint16_t digit_step_dir : 2; // the direction the digit will step on encoder button press when editing + uint16_t rollover : 1; /* Set to true for rollover functionality*/ + uint16_t digit_step_dir : 2; /* the direction the digit will step on encoder button press when editing*/ } lv_spinbox_t; extern const lv_obj_class_t lv_spinbox_class;