Commit Graph

580 Commits

Author SHA1 Message Date
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
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
embeddedt
ebd20af6e9
docs collapse APIs by default 2022-05-09 14:21:31 -04:00
embeddedt
d6911053aa
chore(docs) remove unneeded eval_rst statements 2022-05-09 13:35:03 -04:00
embeddedt
1816fa576c
ci(docs) replace use of sed with proper configuration variables 2022-05-09 13:28:06 -04:00
embeddedt
a3d66c9b67
ci update docs builder to work with Python 3.10 2022-05-09 12:49:03 -04:00
embeddedt
d367bb7cf1
docs(examples) avoid redirects when loading examples 2022-05-07 17:37:51 -04:00
Gabor Kiss-Vamosi
a99eb6bb6a fix(spinbox): rename lv_spinbox_set_pos to lv_spinbox_set_cursor_pos
fixes #3301
2022-05-04 21:14:28 +02:00
Gabriel Wang
6560c792ca
docs(pc-simulator): add MDK with FastModel (#3318) 2022-05-03 23:31:02 +08:00
Gabriel Wang
d5497b0a13
docs(intro): update for v8.2.0 (#3316) 2022-05-02 12:00:16 +08:00
Gabor Kiss-Vamosi
e624b90db3 fix(draw): be sure angle values are in the correct range 2022-04-27 14:25:12 +02:00
Gabor Kiss-Vamosi
8b15007568 fix(draw): create intermediate layer for blend modes too 2022-04-26 11:23:55 +02:00
Gabor Kiss-Vamosi
318146a2c2 feat(draw): support transforming widgets and improfe sw transform
For details see: https://docs.lvgl.io/master/overview/style.html
2022-04-26 10:45:12 +02:00
_VIFEXTech
69aa421acd
docs(gesture): fix typo lv_indev_act() -> lv_indev_get_act() (#3291)
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-04-26 10:32:18 +02:00
woody
07b7eea56c
feat(gpu): add SWM341 gpu support (synwit)
* Update lv_gpu_stm32_dma2d.c

fix stm32 DMA2D blend。

* add SWM341 DMA2D support for lvgl

* add SWM341 DMA2D support for lvgl

* add SWM341 DMA2D support for lvgl

* add SWM341 DMA2D support for lvgl

* add SWM341 DMA2D support for lvgl
2022-04-25 15:13:19 +02:00
simplejack-src
1cf2e5d886
feat(cmake-build): Option to allow building shared libraries. (#3278)
Add option in CMake build to specify that shared libraries should be created (as
opposed to static). This is an exclusive option (not enabled by default).

Co-authored-by: simeplejack-src <example@example.com>
2022-04-20 12:04:56 +02:00
Gabor Kiss-Vamosi
65db5c99e0
docs(gesture): describe how prevent sending events after a gesture
Related to #3211
2022-04-19 10:11:16 +02:00
_VIFEXTech
0fdd5d6449
feat(hal): add render_start_cb to disp_drv (#3274)
* feat(hal): add render_start_cb to disp_drv

* update doc for render_start_cb

* Update docs/porting/display.md

* remove disp_refr parameter

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-04-19 10:05:59 +02:00
Gabor Kiss-Vamosi
777fe1ea70 fix(scroll): send LV_EVENT_SCROLL_BEGIN/END with no animation too 2022-04-14 13:38:03 +02:00
Gabor Kiss-Vamosi
79a29d749d feat(msg): add publisher-subscriber messaging 2022-04-06 22:12:24 +02:00
guoweilkd
47791926f9
feat(span): add an interface for setting the number of lines (#3200)
* fix draw: remove the high overflow judgment code
2022-03-29 13:06:58 +02:00
Xiang Xiao
a6368fec53
fix(docs): rename task-handler.md to timer-handler.md (#3203)
since all task facility is already switched to timer facility

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-24 22:11:45 +01:00
Gabor Kiss-Vamosi
378aaa637b docs: add section for renderers and gpus 2022-03-24 21:52:42 +01:00
Viatorus
962d374791
feat(indev): add possibility to enable/disable all input devices at once (#3179)
* add possibility to globally enable/disable all input devices

* fix copy/paste error

* merge lv_indev_globally_enable into lv_indev_enable

* add missing simicolon

* remove unused variable
2022-03-21 14:53:40 +01:00
Xiang Xiao
fcf833f9af
Minor document update (#3185)
* chore(docs): change "-DLV_USE_BTN 1" to "-DLV_USE_BTN=1"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* chore(docs): update demo related link and description

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 13:34:12 +01:00
Xiang Xiao
bc17353057
chore(docs): remove [lv_sim_...] and [lv_...] from "Repository layout" (#3183)
* chore(docs): remove [lv_sim_...] and [lv_...] from "Repository layout"

since [lv_sim_...] is part of [lv_port...] and [lv_...] just equals no filter at all

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* Update docs/intro/index.md

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-03-21 13:26:19 +01:00
Xiang Xiao
4c4f954059
chore(style): remove the trailing space from all source files (#3188)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 11:25:51 +01:00
Xiang Xiao
6ba51f7f3f
chore(docs): update the link of demos to the new location (#3182)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-20 08:20:57 -04:00
Man, Jianting (Meco)
ca17c204d0
doc(rt-thread): add more BSP supports (#3178)
* doc(rt-thread): add more BSP supports

* improve sconscript
2022-03-18 14:09:01 +01:00
embeddedt
3016266686
chore(docs) fix logical inconsistency in wording 2022-03-17 10:54:26 -04:00
Gabor Kiss-Vamosi
f584a30af3 chore(docs): fix links 2022-03-17 13:47:54 +01:00
Gabor Kiss-Vamosi
8a81532191 docs: rearrange the get-started section
Add folder for Platforms, RTOS, and Bindings
2022-03-17 13:19:53 +01:00
Gabor Kiss-Vamosi
4341660b93
chore(docs): mark v7 as eol 2022-03-17 11:17:35 +01:00
guoweilkd
7713327d61
feat(font): add imgfont - can be used to add emojis to label/span (#3160)
* feature(font): draw img in label/span

* add to tests

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-03-17 10:18:14 +01:00
ckielstra
f79e2838cb
chore(doc): spelling (#3172)
* Spelling: 'an unicode' -> 'a unicode'

* fix(changelog) spelling

* Remove double spaces

* Spelling
2022-03-16 10:19:19 +01:00
Viatorus
45b0f86ae5
feat(disp): add screen out animations (#3081)
* add screen out animations

* make FADE_ON an alias of FADE_IN for backward compatiblitiy

* revert any changes to lv_indev.c

* format code

* update docs

* disable input if screen animation is active
2022-03-10 16:54:42 +01:00
Gabriel Wang
08a3cc0eb6
chore(doc): fix typos in task-handler.md (#3153) 2022-03-08 20:29:40 +01:00
embeddedt
8ac93ad883
refactor(style) move flag information into a dedicated table (#3102) 2022-03-07 10:01:25 -05:00
Carlos Diaz
0a5c5465d2
chore(docs): fix trailing whitespaces in files (#3133) 2022-03-01 13:52:45 +01:00
Andres O. Vela
340d45cfa9
feat(label): added animation style property to apply it to circular scrolling animation of label widget (#3128)
* feat(label): added animation style property to apply it to circular scrolling animation of label widget

Added an animation style property to be used as animation template for different use cases in different widgets.
This commit implements using this property to set the start and repeat delay of the circular scrolling animation of the label widget.

Closes #3097

* fix(label): changed animation style property's var_type to `const lv_anim_t *`

* example(label): added example showing how to customize circular scrolling animation

* chore(label): ran code-format.py and added missing function prototype to lv_example_widgets.h
2022-02-25 11:54:27 +01:00
Carlos Diaz
a83cae012d
feat(script): add pre-commit configuration for code formatting (#3092)
* Add initial pre-commit configuration for code formatting

* chore: Move --recursive switch from cfg file to script

* pre-commit: Update format-source hook to use code-format.cfg

Also remove the code-format-per-file.cfg file as it's now unused

* docs: Add section about pre-commit
2022-02-24 18:44:39 +01:00
GoT
4ed0f011f6
chore(docs): fix type about file system cache_size setting (#3115) 2022-02-24 17:19:04 +01:00
_VIFEXTech
2be4e82991
fix(refr): fix performance monitor NULL pointer access (#3105)
* fix(refr) performance monitor NULL pointer access

* doc(refr): describe the setting of LV_DISP_DEF_REFR_PERIOD

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-02-18 11:32:16 +01:00
GoT
0cbb0087f7
docs(scroll) add information about scroll coordinates (#3088) 2022-02-16 07:49:12 -05:00
Gabor Kiss-Vamosi
e4824f5f6b doc(disp): describe "Decoupling the display refresh timer"
Introduced in 85cc84ad94
2022-02-16 09:27:45 +01:00
GoT
cbcf194bc4
docs(msgbox) fix typo (#3095) 2022-02-15 16:45:02 -05:00
Gabriel Wang
ba38a4bb76
feat(log): improve lv_log and add log the result from lv_demo_benchmark (#3084)
* feat(log): improve log

* Update log.md

* Update log.md

* fix: fix formatting issue

* fix: fix formatting again...

* fix: remove blanks
2022-02-12 20:12:32 +01:00
Mariotaku
e7736f2c32
feat(fragment): add fragment manager (a UI Controller concept) (#2940)
* adding lv_obj_controller

* adding examples for lv_obj_controller

* added some docs

* formatted code

* updated controller docs

* updated controller docs

* updated sample controller field

* changed lv_controller_manager_parent to lv_controller_manager_get_parent

* updated unmanaged controller creation/deletion

* renamed lv_controller_manager_t

* rename: controller -> fragment

* formatted code

* Update examples/others/fragment/lv_example_fragment.h

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

* Update src/extra/others/fragment/lv_fragment.c

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

* Update src/extra/others/fragment/lv_fragment.c

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

* Update src/extra/others/fragment/lv_fragment.c

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

* code cleanup

* fragment creation rework

* (wip) fragment manager

* (wip) fragment manager

* refactoring fragment

* lifecycle fixes

* updated fragment event callback

* exposed states of fragment

* added some docs

* updated lv_fragment_managed_states_t name

* updated docs

* updated docs

* updated lv_fragment_manager_dispatch_event docs

* removed msgbox fragment

* updated fragment docs

* updated fragment docs

* updated docs

* updating examples

* fixed example

* reformatted code

* fixed obj_created set timing

* simplified fragment

* improved fragment view del assertion

* fixed a typo

* fixed event_cb check in lv_obj_remove_event_cb_with_user_data

* fixing fragment obj assertion

* regenerated config

* fixed fragment examples

* fixed fragment examples

* added missing examples

* updated docs

* fragment api cleanup

* rename fragment struct names

* added missing param doc

* enabled test for 32bit build

* feat(porting): add a macro lv_run_timer_handler_in_period to simplify porting (#3063)

* feat(porting): add a macro lv_run_timer_handler_in_period to simplify porting

* feat: update helper function and doc

* doc(porting): update function names

* revise to the original os.md

* fix: fix typo

* fix: mitigate warnings

* chore: fix code formatting

* fix(fsdrv): replacing sprintf with lv_snprintf for safety (#3079)

* fix(Kconfig) remove duplicate LV_BUILD_EXAMPLES configuration

* feat(refr) add reset of FPS statistics

* fix(conf) mismatched macro judgment

* feat(fsdrv) replacing sprintf with lv_snprintf for safety

* feat(fsdrv) update stdio and win32

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

* fix warnings

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: Gabriel Wang <embedded_zhuoran@Hotmail.com>
Co-authored-by: _VIFEXTech <1290176185@qq.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-02-11 12:43:08 +01:00
Gabriel Wang
796f0c0b4e
feat(porting): add a macro lv_run_timer_handler_in_period to simplify porting (#3063)
* feat(porting): add a macro lv_run_timer_handler_in_period to simplify porting

* feat: update helper function and doc

* doc(porting): update function names

* revise to the original os.md

* fix: fix typo

* fix: mitigate warnings
2022-02-07 21:10:12 +01:00