Commit Graph

8042 Commits

Author SHA1 Message Date
Lazar Chervenkov
03c43d95ad
example(imgfont): fix lvgl.h include path (#3405)
When LV_LVGL_H_INCLUDE_SIMPLE is not defined, the path to the lvgl.h gives a compilation error. I fixed the path
2022-06-08 11:08:54 +02:00
Mariotaku
018a8cfdac
fix(sdl): fix LRU, reported in #3402 (#3404)
* fix for #3402

* fixed unsupported type
2022-06-08 11:01:19 +02:00
ivooesch
533e325f21
fix(draw) avoid use-after-free when drawing arcs (#3399)
* Update lv_draw_sw_arc.c

Fixed probelöm with freeing uninitialized, probably not in the most efficient way, as I do not really know the internalk workings of this lib

* Update lv_draw_sw_arc.c
2022-06-07 12:52:10 +02:00
pete-pjb
ff6316c749 revert (msgbox) revert incorrect button padding fix. 2022-06-06 11:10:19 +01:00
Gabriel Wang
c9fa4ef0fc
feat(porting): add flushing control to the template (#3384)
* feat(porting): add flushing control to the template

* Update examples/porting/lv_port_disp_template.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

* Update examples/porting/lv_port_disp_template.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

* Update examples/porting/lv_port_disp_template.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

* Update lv_port_disp_template.h

* use consistent comment

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-06-03 15:08:08 +02:00
qinshijing
e59c83b453
feat(anim): add deleted callback (#3279) (#3295)
Co-authored-by: qinshijing <qinshijing@xiaomi.com>
2022-06-03 11:01:07 +02:00
Gabriel Wang
ce0605182c
feat(cmsis-pack): monthly update for May (#3394) 2022-06-03 10:40:33 +02:00
martaaay
d5ccf379da
docs(slider) mention that VALUE_CHANGED is not sent on release (#3397) 2022-06-02 19:50:17 -04:00
Gabor Kiss-Vamosi
9ac8ce69f6 fix(draw): handle non BLEND_MODE_NORMAL for ARGB drawing 2022-06-02 10:16:42 +02:00
Johannes Marbach
eef838f51f
feat(textarea): make it possible to customize the bullet character (#3388)
* feat(textarea): Make it possible to customise the bullet character

This adds functions to allow overriding the default bullet character
with a custom one (or even no character at all).

* Update docs/widgets/core/textarea.md

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-05-30 12:05:22 +02:00
kctan0805
6ad52a7119
fix(subpx): fix subpixel rendering font is not displaying bug (#3387) 2022-05-28 21:39:28 +02:00
Amir Gonnen
6a8dd1a3b6
fix(style): reset style lookup table after gc sweep/lv_deinit (#3385) 2022-05-28 21:21:01 +02:00
Gabor Kiss-Vamosi
6be43b83b3 fix(gpu): fix warning with NXP GPU
fixes https://github.com/lvgl/lvgl/pull/3322#issuecomment-1139282874
2022-05-27 21:07:16 +02:00
PeterB
d4c9ab5037 chore(msg_box) correct formatting. 2022-05-27 11:17:17 +01:00
PeterB
cb4da38e3c Fix(msgbox) correct msg_box button padding if LV_DPI_DEF is set to less
than 130
2022-05-27 11:05:37 +01:00
_VIFEXTech
d151a6789f
feat(disp): add a temporary invalidation disable interface (#3378)
* feat(disp): add a temporary disable invalidation interface

* minor adjustments

* remove forgotten comment

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-05-26 22:46:55 +02:00
ExplorerLog
2cf4d4b17e
chore correct file encodings (#3381)
Change "UTF-8 with BOM" to "UTF-8"
2022-05-26 13:06:58 -04:00
Dennis Field
2e93b88ead
feat(group): add edge callbacks when trying to move focus past beginning or end (#3374) 2022-05-24 15:31:46 +02:00
_VIFEXTech
6e3d01190f
feat(benchmark): make lvgl render at the highest frame rate (#3352)
* feat(benchmark): make lvgl render at the highest frame rate

* add lv_demo_benchmark_set_max_speed

* Update comments and README

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-05-24 12:36:22 +02:00
nicusorcitu
029eef79c4
feat(gpu): reattach nxp pxp vglite accelerators(#3322)
* feat(pxp/vglite) Attach NXP GPUs to the new draw context.

Create a single NXP draw layer on top of PXP and VGLITE.
Extra changes:
1. Add VGLITE image blits acceleration.
2. Reenable blit split workaround for quality issue in RT500.
3. Increase threshold from 32 to 5000 px to fill/blit with both PXP and VGLITE.
4. Allow to enable both PXP and VGLITE. Add a fallback mechanism:
- by default the PXP will try to accelerate. if that is not supported (or fails
due to threshold limit condition from 3.) then it will fallback to VGLITE.
- if VGLITE does not support that feature (or fails due to threshold limit
condition from 3.) the it will fallback to CPU.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* feat(vglite) Add VGLITE support to draw the backgroud of rectangles.

optim: draw only a circle when radius has value LV_RADIUS_CIRCLE.
optim: to draw rounded corners, use cubic bezier curves

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* feat(vglite) Add VGLITE support to draw arcs.

Use up to 4 bezier curves to optimize the drawing of an arc.
The arc curve has to be constant when growing the angle:
for this we compute sub-arc based on a best approximation of quarter-arc.
use dichotomy to find the sub-arc 't' param, instead of tangent approximation.

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* feat(pxp) Add ARGB88888 format support for PXP backend.

Supports per pixel and global alpha blending, and combination of alpha blending with recolor feature.

Signed-off-by: Jerome Evillard <jerome.evillard@nxp.com>
Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* feat(vglite) Add the support of ARGB 32bits color format.

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* feat(vglite) Add VGLITE acceleration support for rotation and zoom.

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* feat(pxp) Add PXP acceleratin to rotate in blit.

Applies the rotation on the pxp output.

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(pxp/vglite) Avoid calling the blend callback from image decoded callback.

Add lv_gpu_nxp_pxp_blit_transform() and lv_gpu_nxp_vglite_blit_transform().
This will simplify a lot the fallback mechanism and the way of adding new
image decoded features.
(MGG-884)

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* feat(pxp) Add image rotate 90x.

Simplify the two steps process by adding the blit_cover and blit_opa functions.

In order to rotate or recolor with opacity, two steps must be fallowed:
1. Run the operation without opa.
2. Blend the result by applying the opa.
(MGG-469)

Obs:
Recolor and rotate is currently not supported with opa or alpha channel.(MGG-883)

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(vglite) Fix incorrect slider widget indicator when vglite acceleration is enabled

(MGG-863)

Signed-off-by: Stefan Babatie <stefan.babatie@nxp.com>
Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(pxp) Fix pxp fill (simple rect draw)  on 32 bit color depth.

(MGG-890)

Signed-off-by: Stefan Babatie <stefan.babatie@nxp.com>

* fix(pxp) Separate blit simple by the blit with transformation.

While we run into blit with transformation we have to
decide if the operation needs to be done in one or two steps.
Blit with color format (opa or alpha or chroma key) - require one step: blit_cf().
Blit with rotate or recolor but no color format - require one step: blit_cover().
Blit with rotate or recolor + opa or alpha - require two steps:
blit_opa() = blit_cover() + blit_cf().
Blit with rotate or recolor + chroma key - not supported yet.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* feat(pxp) Add support for recolor with chroma-keying.

(MGG-434)

Signed-off-by: Stefan Babatie <stefan.babatie@nxp.com>

* fix(pxp) Fix temporary buffer allocation limit.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(pxp) Add PXP limitation while rotating images not aligned to 16x16 blocks.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(nxp) Add makefiles.

Tested with:
      working-directory: tests/makefile
      run: make test_file

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* feat(nxp) Update NXP github documentation.

(MGG-864)

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(nxp) Move the API comments of global functions only in the H files to make maintenance simpler.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(nxp/vglite) Fixed some warnings. Remove unused variables.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(nxp) lv_draw_nxp_ctx_deinit() shall simply fallback to sofware call.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(nxp) Fallback to software callbacks if need for argb8565 support.

During rendering, LVGL might initializes new draw_ctxs and start drawing into
a separate buffer (called layer). If the content to be rendered has "holes",
e.g. rounded corner, LVGL temporarily sets the disp_drv.screen_transp flag.
It means the renderers should draw into an ARGB buffer.
With 32 bit color depth it's not a big problem but with 16 bit color depth
the target pixel format is ARGB8565 which is not supported by the GPU.
In this case, the NXP callbacks should fallback to SW rendering.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(pxp) Fix wrong demo widget transparency.

1. Fix alpha inverted calculation for fill with opacity.
2. Fix also the ratio of recoloring for chroma key.

Signed-off-by: Stefan Babatie <stefan.babatie@nxp.com>

* fix(vglite) Remove software pre-multiplication when hardware pre-multiplication is available.

(MGG-886)

Signed-off-by: Stefan Babatie <stefan.babatie@nxp.com>

* doc(vglite) Add vglite initialization info.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(pxp/vglite) Fix unused variable warnings when PXP/VGLite are not enabled simultaneously.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

* fix(pxp) Fixed the color key recoloring on 16 bits color depth.

1. Fixed the arguments of lv_color_mix(), previously was using an inversed logic. But it works anyway.
2. Use LV_COLOR_SET_X for adjusting the channels on both 16 and 32 bits. Fixed the max values.

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>

Co-authored-by: Stefan Babatie <stefan.babatie@nxp.com>
2022-05-24 11:43:57 +02:00
Gabor Kiss-Vamosi
52287fd64a fix(disp): make lv_scr_load work better with lv_scr_load_anim and auto_del = true
related to: https://forum.lvgl.io/t/crash-when-delete-a-screen-by-using-lv-obj-del/8930
2022-05-23 16:42:26 +02:00
Man, Jianting (Meco)
c63d12f6da
feat(rt-thread): allow users to control refresh period in the lvgl thread (#3375) 2022-05-22 14:45:49 +02:00
Gabriel Wang
4e06025e1d
fix(benchmark): fix the issue that wrong scene number is used (#3372)
* fix(benchmark): fix the issue that wrong scene number is used when display the result

* remove white-spaces
2022-05-20 13:46:42 +02:00
Gabriel Wang
332d0abcfc
fix(draw): fix colour supports for indexed and alpha-only (#3371) 2022-05-20 09:32:59 +02:00
Gabor Kiss-Vamosi
7bb09e3580 example(span): avoid ambiguous meaing
fixes: https://github.com/lvgl/lvgl/pull/2227#issuecomment-1131193923
2022-05-19 13:01:28 +02:00
Gabor Kiss-Vamosi
42d9c07eeb fix(color): compensate rounding error during blending
fixes #3362
2022-05-18 23:08:12 +02:00
embeddedt
71d535defd
fix(examples) use type-safe function for retrieving event param
Fixes #3364
2022-05-18 13:58:35 -04:00
embeddedt
276f28a8a2
fix(draw) ensure variable is initialized to avoid warning
Fixes #3365
2022-05-18 08:53:35 -04:00
Gabor Kiss-Vamosi
22854ff3fb fix(tabview, tileview): fix scrolling
The issue was introduced by 777fe1ea. It sends SCOLL_END event even when there is no scroll aniamtion
2022-05-18 12:03:37 +02:00
Gabor Kiss-Vamosi
523062b9ee fix(color): color mix rounding error
fixes: #3362
2022-05-18 07:57:48 +02:00
Gabriel Wang
a7cfc0b901
feat(cmsis-pack): Monthly update for May (alpha) (#3359)
* feat(cmsis-pack): Monthly update for May

* fix(benchmark): fix a typo

* fix(draw): fix warning

* Update LVGL.lvgl.1.0.4-alpha5.pack

* feat(arm-2d): add a quick patch to support RGB565A8
2022-05-16 20:41:59 +02:00
Gabriel Wang
c5d1557738
feat(demos): add a callback for benchmark (#3353)
* feat(demos): add a callback for benchmark to indicate testing is finished

* update doc and fix code-format

* fix code-format issue

* Update demos/benchmark/lv_demo_benchmark.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

* change function name accordingly.

* Update demos/benchmark/README.md

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-05-16 17:58:44 +02:00
Gabor Kiss-Vamosi
834a118847 fix warnings 2022-05-16 17:39:31 +02:00
Gabor Kiss-Vamosi
ccbb41dedc chore(img): update API comments
fix: #3350
2022-05-16 17:23:20 +02:00
Gabor Kiss-Vamosi
76de7c6b7b fix(draw): fix the calculation of the transformed coordinates
fixes https://forum.lvgl.io/t/inaccurate-bitmap-zoom/8858
2022-05-16 17:15:36 +02:00
Gabor Kiss-Vamosi
67446a4922 support chrome keysed image rotatation 2022-05-16 17:15:36 +02:00
Gabor Kiss-Vamosi
930115edbb revert example 2022-05-16 17:15:36 +02:00
Gabor Kiss-Vamosi
2716475932 formatting 2022-05-16 17:15:36 +02:00
Gabor Kiss-Vamosi
b773330234 fix conflicts 2022-05-16 17:15:36 +02:00
Rafael M
c72b899d33
docs(readme): add version portuguese brazilian (#3349) 2022-05-16 16:16:41 +02:00
Gabriel Wang
6ae0784251
feat(gpu): Update lv_gpu_arm2d with new features (#3340)
* feat(gpu): Update lv_gpu_arm2d with new features

- Provide acceleration for
    * Transform
    * Recolour
    * Chrome-Key

* remove typos

* fix code-format issue

* update according to #3337

* remove the last /* *INDENT-ON* */
2022-05-16 11:15:49 +08:00
embeddedt
2148ed99b0
fix(mem): fix TLSF returning the wrong pointer when the requested size is too large (#3325)
* test(mem) add test for #3324

* fix(tlsf) don't return the same pointer if the requested size is too large
2022-05-14 22:04:13 +02:00
_VIFEXTech
0d6c08105a
fix(demo): fix warning. (#3344)
* fix(demo): fix warning.

lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.c:169:5: warning: "LV_EX_MOUSEWHEEL" is not defined, evaluates to 0 [-Wundef]
  169 | #if LV_EX_MOUSEWHEEL
      |     ^~~~~~~~~~~~~~~~

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>

* fix benchmark warning.

~/lvgl/demos/benchmark/lv_demo_benchmark.c:1069:33: warning: cast between incompatible function types from ‘void (*)(lv_obj_t , uint16_t)’ {aka ‘void ()(struct _lv_obj_t , short unsigned int)’} to ‘void ()(void , int32_t)’ {aka ‘void ()(void , int)’} [-Wcast-function-type]
1069 | lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t) lv_arc_set_end_angle);
| ^
~/lvgl/demos/benchmark/lv_demo_benchmark.c: In function ‘fall_anim’:
~/lvgl/demos/benchmark/lv_demo_benchmark.c:1090:29: warning: cast between incompatible function types from ‘void ()(struct _lv_obj_t , lv_coord_t)’ {aka ‘void ()(struct _lv_obj_t , short int)’} to ‘void ()(void , int32_t)’ {aka ‘void ()(void *, int)’} [-Wcast-function-type]
1090 | lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t) lv_obj_set_y);
|

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-05-14 07:35:12 +02:00
Xiang Xiao
58b75f1175
fix(config): add LV_GPU_SDL_LRU_SIZE (#3348)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-12 12:41:41 +02:00
Man, Jianting (Meco)
40e9c6b9e0
chore(rt.thread): improve rt-thread marcos (#3355) 2022-05-12 09:35:28 +02:00
Gabor Kiss-Vamosi
941d95b049
chore(imfont): fix heading in the docs 2022-05-11 22:10:25 +02:00
Gabor Kiss-Vamosi
656a0e5167
docs(others): add imgfont to the index 2022-05-11 21:04:20 +02:00
Man, Jianting (Meco)
a6cbf3146a
improve rt-thread initialization process (#3345) 2022-05-10 19:55:22 +02:00
Gabor Kiss-Vamosi
cc18518e96 feat(indev): send LV_EVENT_PRESS_LOST on release with wait_until_release
related to #3211
2022-05-10 19:29:13 +02:00
Gabriel Wang
8d3c41d517
feat(draw): improve acceleration for LV_IMG_CF_ALPHA_8BIT (#3337)
* feat(draw): improve acceleration for LV_IMG_CF_ALPHA_8BIT

* fix format issue

* fix: use normal method when conditions are not fulfilled.

* fix a typo

* feat(demo): add Weighted FPS and Opa speed log output (#3326)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>

* perf(layer): cache the layer_type

fixes #3334

* fix partial redraw and setting color

Co-authored-by: _VIFEXTech <1290176185@qq.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-05-10 18:52:50 +02:00