feat(dma2d): add support for ARGB1555 color on top of RGB565 format (#7555)
Arduino Lint / lint (push) Waiting to run
MicroPython CI / Build ${{ matrix.port }} port (esp32) (push) Waiting to run
MicroPython CI / Build ${{ matrix.port }} port (rp2) (push) Waiting to run
MicroPython CI / Build ${{ matrix.port }} port (stm32) (push) Waiting to run
MicroPython CI / Build ${{ matrix.port }} port (unix) (push) Waiting to run
C/C++ CI / Build ${{ matrix.build_option }} (OPTIONS_16BIT) (push) Waiting to run
C/C++ CI / Build ${{ matrix.build_option }} (OPTIONS_24BIT) (push) Waiting to run
C/C++ CI / Build ${{ matrix.build_option }} (OPTIONS_FULL_32BIT) (push) Waiting to run
C/C++ CI / Build ${{ matrix.build_option }} (OPTIONS_SDL) (push) Waiting to run
C/C++ CI / Build ${{ matrix.build_option }} (OPTIONS_VG_LITE) (push) Waiting to run
C/C++ CI / Build Windows GCC (push) Waiting to run
C/C++ CI / Build Windows MSVC (push) Waiting to run
C/C++ CI / Build ESP IDF ESP32S3 (push) Waiting to run
C/C++ CI / Run tests with ${{ matrix.build_config }} (32bit build) (push) Waiting to run
C/C++ CI / Run tests with ${{ matrix.build_config }} (64bit build) (push) Waiting to run
BOM Check / bom-check (push) Waiting to run
Verify that lv_conf_internal.h matches repository state / verify-conf-internal (push) Waiting to run
Verify the widget property name / verify-property-name (push) Waiting to run
Verify code formatting / verify-formatting (push) Waiting to run
Build docs / build-and-deploy (push) Waiting to run
Test API JSON generator / Test API JSON (push) Waiting to run
Check Makefile / Build using Makefile (push) Waiting to run
Check Makefile for UEFI / Build using Makefile for UEFI (push) Waiting to run
Verify Kconfig / verify-kconfig (push) Waiting to run

Signed-off-by: Felipe Neves <felipe@lvgl.io>
This commit is contained in:
Felipe Neves
2025-01-09 23:41:02 -03:00
committed by GitHub
parent 4e52b15508
commit 5563787cac
3 changed files with 12 additions and 1 deletions
+4
View File
@@ -292,4 +292,8 @@ If ``LV_USE_DRAW_DMA2D_INTERRUPT`` is enabled then you are required to call
:cpp:expr:`lv_draw_dma2d_transfer_complete_interrupt_handler` whenever the DMA2D
"transfer complete" global interrupt is received.
DMA2D also makes possible to mix layers that have color format on
:c:macro:`LV_COLOR_FORMAT_ARGB1555` on top of :c:macro:`LV_COLOR_FORMAT_RGB565`
layers.
If your STM device has a NeoChrom GPU, you can use the :ref:`Nema GFX renderer <nema_gfx>` instead.
@@ -103,6 +103,10 @@ partial buffers in parallel with other LVGL tasks, whether or not OS is
enabled. If the display is not partial, then there is no need to enable this
option.
Additionally it is possible to mix layers that have color format on
:c:macro:`LV_COLOR_FORMAT_ARGB1555` on top of :c:macro:`LV_COLOR_FORMAT_RGB565`
layers using the DMA2D.
It must not be enabled at the same time as :c:macro:`LV_USE_DRAW_DMA2D`.
See the :ref:`DMA2D support <dma2d>`.
+4 -1
View File
@@ -131,6 +131,8 @@ lv_draw_dma2d_output_cf_t lv_draw_dma2d_cf_to_dma2d_output_cf(lv_color_format_t
return LV_DRAW_DMA2D_OUTPUT_CF_RGB888;
case LV_COLOR_FORMAT_RGB565:
return LV_DRAW_DMA2D_OUTPUT_CF_RGB565;
case LV_COLOR_FORMAT_ARGB1555:
return LV_DRAW_DMA2D_OUTPUT_CF_ARGB1555;
default:
LV_ASSERT_MSG(false, "unsupported output color format");
}
@@ -310,7 +312,8 @@ static int32_t evaluate_cb(lv_draw_unit_t * draw_unit, lv_draw_task_t * task)
&& (dsc->header.cf == LV_COLOR_FORMAT_ARGB8888
|| dsc->header.cf == LV_COLOR_FORMAT_XRGB8888
|| dsc->header.cf == LV_COLOR_FORMAT_RGB888
|| dsc->header.cf == LV_COLOR_FORMAT_RGB565)
|| dsc->header.cf == LV_COLOR_FORMAT_RGB565
|| dsc->header.cf == LV_COLOR_FORMAT_ARGB1555)
&& (dsc->base.layer->color_format == LV_COLOR_FORMAT_ARGB8888
|| dsc->base.layer->color_format == LV_COLOR_FORMAT_XRGB8888
|| dsc->base.layer->color_format == LV_COLOR_FORMAT_RGB888