feat(vg_lite_tvg): organize configuration items (#5280)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
48
Kconfig
48
Kconfig
@@ -355,25 +355,6 @@ menu "LVGL configuration"
|
|||||||
default n
|
default n
|
||||||
depends on LV_USE_DRAW_VG_LITE
|
depends on LV_USE_DRAW_VG_LITE
|
||||||
|
|
||||||
config LV_USE_VG_LITE_THORVG
|
|
||||||
bool "Use ThorVG to simulate VG-Lite hardware."
|
|
||||||
default n
|
|
||||||
depends on LV_USE_DRAW_VG_LITE && LV_USE_THORVG
|
|
||||||
help
|
|
||||||
Use thorvg to simulate VG-Lite hardware behavior, it's useful
|
|
||||||
for debugging and testing on PC simulator. Enable LV_USE_THORVG,
|
|
||||||
Either internal ThorVG or external ThorVG library is required.
|
|
||||||
|
|
||||||
config LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
bool "Enable trace log for VG-Lite ThorVG simulator"
|
|
||||||
default n
|
|
||||||
depends on LV_USE_VG_LITE_THORVG
|
|
||||||
|
|
||||||
config LV_VG_LITE_THORVG_YUV_SUPPORT
|
|
||||||
bool "Enable YUV support for VG-Lite ThorVG simulator"
|
|
||||||
default n
|
|
||||||
depends on LV_USE_VG_LITE_THORVG
|
|
||||||
|
|
||||||
config LV_USE_GPU_SDL
|
config LV_USE_GPU_SDL
|
||||||
bool "Use SDL renderer API"
|
bool "Use SDL renderer API"
|
||||||
default n
|
default n
|
||||||
@@ -1284,6 +1265,35 @@ menu "LVGL configuration"
|
|||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
This can save some memory, but not much. After the quick access bar is created, it can be hidden by clicking the button at the top left corner of the browsing area, which is very useful for small screen devices.
|
This can save some memory, but not much. After the quick access bar is created, it can be hidden by clicking the button at the top left corner of the browsing area, which is very useful for small screen devices.
|
||||||
|
|
||||||
|
menuconfig LV_USE_VG_LITE_THORVG
|
||||||
|
bool "VG-Lite Simulator"
|
||||||
|
default n
|
||||||
|
depends on LV_USE_THORVG
|
||||||
|
help
|
||||||
|
Use thorvg to simulate VG-Lite hardware behavior, it's useful
|
||||||
|
for debugging and testing on PC simulator. Enable LV_USE_THORVG,
|
||||||
|
Either internal ThorVG or external ThorVG library is required.
|
||||||
|
|
||||||
|
config LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
|
||||||
|
bool "Enable LVGL blend mode support"
|
||||||
|
default n
|
||||||
|
depends on LV_USE_VG_LITE_THORVG
|
||||||
|
|
||||||
|
config LV_VG_LITE_THORVG_YUV_SUPPORT
|
||||||
|
bool "Enable YUV color format support"
|
||||||
|
default n
|
||||||
|
depends on LV_USE_VG_LITE_THORVG
|
||||||
|
|
||||||
|
config LV_VG_LITE_THORVG_16PIXELS_ALIGN
|
||||||
|
bool "Enable 16 pixels alignment"
|
||||||
|
default y
|
||||||
|
depends on LV_USE_VG_LITE_THORVG
|
||||||
|
|
||||||
|
config LV_VG_LITE_THORVG_THREAD_RENDER
|
||||||
|
bool "Enable multi-thread render"
|
||||||
|
default n
|
||||||
|
depends on LV_USE_VG_LITE_THORVG
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Devices"
|
menu "Devices"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
|||||||
file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c ${LVGL_ROOT_DIR}/src/*.S)
|
file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c ${LVGL_ROOT_DIR}/src/*.S)
|
||||||
file(GLOB_RECURSE EXAMPLE_SOURCES ${LVGL_ROOT_DIR}/examples/*.c)
|
file(GLOB_RECURSE EXAMPLE_SOURCES ${LVGL_ROOT_DIR}/examples/*.c)
|
||||||
file(GLOB_RECURSE DEMO_SOURCES ${LVGL_ROOT_DIR}/demos/*.c)
|
file(GLOB_RECURSE DEMO_SOURCES ${LVGL_ROOT_DIR}/demos/*.c)
|
||||||
file(GLOB_RECURSE THORVG_SOURCES ${LVGL_ROOT_DIR}/src/libs/thorvg/*.cpp ${LVGL_ROOT_DIR}/src/dev/vg_lite_tvg/*.cpp)
|
file(GLOB_RECURSE THORVG_SOURCES ${LVGL_ROOT_DIR}/src/libs/thorvg/*.cpp ${LVGL_ROOT_DIR}/src/others/vg_lite_tvg/*.cpp)
|
||||||
|
|
||||||
# Build LVGL library
|
# Build LVGL library
|
||||||
add_library(lvgl ${SOURCES})
|
add_library(lvgl ${SOURCES})
|
||||||
|
|||||||
@@ -141,15 +141,6 @@
|
|||||||
/* Enable VG-Lite assert. */
|
/* Enable VG-Lite assert. */
|
||||||
#define LV_VG_LITE_USE_ASSERT 0
|
#define LV_VG_LITE_USE_ASSERT 0
|
||||||
|
|
||||||
/* Simulate VG-Lite hardware using ThorVG */
|
|
||||||
#define LV_USE_VG_LITE_THORVG 0
|
|
||||||
|
|
||||||
/* Enable trace log for VG-Lite simulator*/
|
|
||||||
#define LV_VG_LITE_THORVG_TRACE_API 0
|
|
||||||
|
|
||||||
/*Enable YUV support for VG-Lite simulator*/
|
|
||||||
#define LV_VG_LITE_THORVG_YUV_SUPPORT 0
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*=================
|
/*=================
|
||||||
@@ -304,6 +295,26 @@
|
|||||||
/*Use obj property set/get API*/
|
/*Use obj property set/get API*/
|
||||||
#define LV_USE_OBJ_PROPERTY 0
|
#define LV_USE_OBJ_PROPERTY 0
|
||||||
|
|
||||||
|
/* VG-Lite Simulator */
|
||||||
|
/*Requires: LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL */
|
||||||
|
#define LV_USE_VG_LITE_THORVG 0
|
||||||
|
|
||||||
|
#if LV_USE_VG_LITE_THORVG
|
||||||
|
|
||||||
|
/*Enable LVGL's blend mode support*/
|
||||||
|
#define LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT 0
|
||||||
|
|
||||||
|
/*Enable YUV color format support*/
|
||||||
|
#define LV_VG_LITE_THORVG_YUV_SUPPORT 0
|
||||||
|
|
||||||
|
/*Enable 16 pixels alignment*/
|
||||||
|
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1
|
||||||
|
|
||||||
|
/*Enable multi-thread render*/
|
||||||
|
#define LV_VG_LITE_THORVG_THREAD_RENDER 0
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
* COMPILER SETTINGS
|
* COMPILER SETTINGS
|
||||||
*====================*/
|
*====================*/
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
--exclude=../src/lv_conf_internal.h
|
--exclude=../src/lv_conf_internal.h
|
||||||
--exclude=../src/core/lv_obj_style_gen.c
|
--exclude=../src/core/lv_obj_style_gen.c
|
||||||
--exclude=../src/core/lv_obj_style_gen.h
|
--exclude=../src/core/lv_obj_style_gen.h
|
||||||
--exclude=../src/dev/vg_lite_tvg/vg_lite.h
|
|
||||||
--exclude=../src/libs/gif/gifdec.c
|
--exclude=../src/libs/gif/gifdec.c
|
||||||
--exclude=../src/libs/gif/gifdec.h
|
--exclude=../src/libs/gif/gifdec.h
|
||||||
--exclude=../src/libs/lodepng/lodepng.c
|
--exclude=../src/libs/lodepng/lodepng.c
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
--exclude=../src/libs/tjpgd/tjpgdcnf.h
|
--exclude=../src/libs/tjpgd/tjpgdcnf.h
|
||||||
--exclude=../src/libs/thorvg
|
--exclude=../src/libs/thorvg
|
||||||
--exclude=../src/libs/lz4
|
--exclude=../src/libs/lz4
|
||||||
|
--exclude=../src/others/vg_lite_tvg/vg_lite.h
|
||||||
--exclude=../tests/unity/unity.c
|
--exclude=../tests/unity/unity.c
|
||||||
--exclude=../tests/unity/unity_internals.h
|
--exclude=../tests/unity/unity_internals.h
|
||||||
--exclude=../tests/unity/unity_support.c
|
--exclude=../tests/unity/unity_support.c
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ extern "C" {
|
|||||||
#include "../lv_draw.h"
|
#include "../lv_draw.h"
|
||||||
|
|
||||||
#if LV_USE_VG_LITE_THORVG
|
#if LV_USE_VG_LITE_THORVG
|
||||||
#include "../../dev/vg_lite_tvg/vg_lite.h"
|
#include "../../others/vg_lite_tvg/vg_lite.h"
|
||||||
#else
|
#else
|
||||||
#include <vg_lite.h>
|
#include <vg_lite.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ extern "C" {
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#if LV_USE_VG_LITE_THORVG
|
#if LV_USE_VG_LITE_THORVG
|
||||||
#include "../../dev/vg_lite_tvg/vg_lite.h"
|
#include "../../others/vg_lite_tvg/vg_lite.h"
|
||||||
#else
|
#else
|
||||||
#include <vg_lite.h>
|
#include <vg_lite.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -387,33 +387,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Simulate VG-Lite hardware using ThorVG */
|
|
||||||
#ifndef LV_USE_VG_LITE_THORVG
|
|
||||||
#ifdef CONFIG_LV_USE_VG_LITE_THORVG
|
|
||||||
#define LV_USE_VG_LITE_THORVG CONFIG_LV_USE_VG_LITE_THORVG
|
|
||||||
#else
|
|
||||||
#define LV_USE_VG_LITE_THORVG 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Enable trace log for VG-Lite simulator*/
|
|
||||||
#ifndef LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
#ifdef CONFIG_LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
#define LV_VG_LITE_THORVG_TRACE_API CONFIG_LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
#else
|
|
||||||
#define LV_VG_LITE_THORVG_TRACE_API 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Enable YUV support for VG-Lite simulator*/
|
|
||||||
#ifndef LV_VG_LITE_THORVG_YUV_SUPPORT
|
|
||||||
#ifdef CONFIG_LV_VG_LITE_THORVG_YUV_SUPPORT
|
|
||||||
#define LV_VG_LITE_THORVG_YUV_SUPPORT CONFIG_LV_VG_LITE_THORVG_YUV_SUPPORT
|
|
||||||
#else
|
|
||||||
#define LV_VG_LITE_THORVG_YUV_SUPPORT 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*=================
|
/*=================
|
||||||
@@ -860,6 +833,60 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* VG-Lite Simulator */
|
||||||
|
/*Requires: LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL */
|
||||||
|
#ifndef LV_USE_VG_LITE_THORVG
|
||||||
|
#ifdef CONFIG_LV_USE_VG_LITE_THORVG
|
||||||
|
#define LV_USE_VG_LITE_THORVG CONFIG_LV_USE_VG_LITE_THORVG
|
||||||
|
#else
|
||||||
|
#define LV_USE_VG_LITE_THORVG 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LV_USE_VG_LITE_THORVG
|
||||||
|
|
||||||
|
/*Enable LVGL's blend mode support*/
|
||||||
|
#ifndef LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
|
||||||
|
#ifdef CONFIG_LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
|
||||||
|
#define LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT CONFIG_LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
|
||||||
|
#else
|
||||||
|
#define LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*Enable YUV color format support*/
|
||||||
|
#ifndef LV_VG_LITE_THORVG_YUV_SUPPORT
|
||||||
|
#ifdef CONFIG_LV_VG_LITE_THORVG_YUV_SUPPORT
|
||||||
|
#define LV_VG_LITE_THORVG_YUV_SUPPORT CONFIG_LV_VG_LITE_THORVG_YUV_SUPPORT
|
||||||
|
#else
|
||||||
|
#define LV_VG_LITE_THORVG_YUV_SUPPORT 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*Enable 16 pixels alignment*/
|
||||||
|
#ifndef LV_VG_LITE_THORVG_16PIXELS_ALIGN
|
||||||
|
#ifdef _LV_KCONFIG_PRESENT
|
||||||
|
#ifdef CONFIG_LV_VG_LITE_THORVG_16PIXELS_ALIGN
|
||||||
|
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN CONFIG_LV_VG_LITE_THORVG_16PIXELS_ALIGN
|
||||||
|
#else
|
||||||
|
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN 0
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*Enable multi-thread render*/
|
||||||
|
#ifndef LV_VG_LITE_THORVG_THREAD_RENDER
|
||||||
|
#ifdef CONFIG_LV_VG_LITE_THORVG_THREAD_RENDER
|
||||||
|
#define LV_VG_LITE_THORVG_THREAD_RENDER CONFIG_LV_VG_LITE_THORVG_THREAD_RENDER
|
||||||
|
#else
|
||||||
|
#define LV_VG_LITE_THORVG_THREAD_RENDER 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
* COMPILER SETTINGS
|
* COMPILER SETTINGS
|
||||||
*====================*/
|
*====================*/
|
||||||
|
|||||||
@@ -27,13 +27,6 @@
|
|||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
|
|
||||||
/* Configuration reference. */
|
|
||||||
// #define LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
|
|
||||||
// #define LV_VG_LITE_THORVG_YUV_SUPPORT
|
|
||||||
// #define LV_VG_LITE_THORVG_16PIXELS_ALIGN
|
|
||||||
// #define LV_VG_LITE_THORVG_THREAD_RENDER
|
|
||||||
// #define LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
|
|
||||||
#ifndef LV_VG_LITE_THORVG_BUF_ADDR_ALIGN
|
#ifndef LV_VG_LITE_THORVG_BUF_ADDR_ALIGN
|
||||||
#define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN 64
|
#define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN 64
|
||||||
#endif
|
#endif
|
||||||
@@ -442,10 +435,6 @@ extern "C" {
|
|||||||
|
|
||||||
vg_lite_error_t vg_lite_allocate(vg_lite_buffer_t * buffer)
|
vg_lite_error_t vg_lite_allocate(vg_lite_buffer_t * buffer)
|
||||||
{
|
{
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_allocate %p", buffer);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(buffer->format == VG_LITE_RGBA8888_ETC2_EAC && (buffer->width % 16 || buffer->height % 4)) {
|
if(buffer->format == VG_LITE_RGBA8888_ETC2_EAC && (buffer->width % 16 || buffer->height % 4)) {
|
||||||
return VG_LITE_INVALID_ARGUMENT;
|
return VG_LITE_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
@@ -591,7 +580,7 @@ extern "C" {
|
|||||||
{
|
{
|
||||||
LV_UNUSED(tessellation_width);
|
LV_UNUSED(tessellation_width);
|
||||||
LV_UNUSED(tessellation_height);
|
LV_UNUSED(tessellation_height);
|
||||||
#ifdef LV_VG_LITE_THORVG_THREAD_RENDER
|
#if LV_VG_LITE_THORVG_THREAD_RENDER
|
||||||
/* Threads Count */
|
/* Threads Count */
|
||||||
auto threads = std::thread::hardware_concurrency();
|
auto threads = std::thread::hardware_concurrency();
|
||||||
if(threads > 0) {
|
if(threads > 0) {
|
||||||
@@ -737,7 +726,7 @@ extern "C" {
|
|||||||
case gcFEATURE_BIT_VG_DITHER:
|
case gcFEATURE_BIT_VG_DITHER:
|
||||||
case gcFEATURE_BIT_VG_USE_DST:
|
case gcFEATURE_BIT_VG_USE_DST:
|
||||||
|
|
||||||
#ifdef LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
|
#if LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
|
||||||
case gcFEATURE_BIT_VG_LVGL_SUPPORT:
|
case gcFEATURE_BIT_VG_LVGL_SUPPORT:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -745,7 +734,7 @@ extern "C" {
|
|||||||
case gcFEATURE_BIT_VG_YUV_INPUT:
|
case gcFEATURE_BIT_VG_YUV_INPUT:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LV_VG_LITE_THORVG_16PIXELS_ALIGN
|
#if LV_VG_LITE_THORVG_16PIXELS_ALIGN
|
||||||
case gcFEATURE_BIT_VG_16PIXELS_ALIGN:
|
case gcFEATURE_BIT_VG_16PIXELS_ALIGN:
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
@@ -892,10 +881,6 @@ extern "C" {
|
|||||||
{
|
{
|
||||||
vg_lite_error_t error = VG_LITE_SUCCESS;
|
vg_lite_error_t error = VG_LITE_SUCCESS;
|
||||||
|
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_init_grad %p", grad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Set the member values according to driver defaults. */
|
/* Set the member values according to driver defaults. */
|
||||||
grad->image.width = VLC_GRADIENT_BUFFER_WIDTH;
|
grad->image.width = VLC_GRADIENT_BUFFER_WIDTH;
|
||||||
grad->image.height = 1;
|
grad->image.height = 1;
|
||||||
@@ -934,11 +919,6 @@ extern "C" {
|
|||||||
vg_lite_color_ramp_t * src_ramp_last;
|
vg_lite_color_ramp_t * src_ramp_last;
|
||||||
vg_lite_color_ramp_t * trg_ramp;
|
vg_lite_color_ramp_t * trg_ramp;
|
||||||
|
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_set_linear_grad %p %d %p (%f %f %f %f) %d %d", grad, count, color_ramp,
|
|
||||||
linear_gradient.X0, linear_gradient.X1, linear_gradient.Y0, linear_gradient.Y1, spread_mode, pre_multiplied);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Reset the count. */
|
/* Reset the count. */
|
||||||
trg_count = 0;
|
trg_count = 0;
|
||||||
|
|
||||||
@@ -1054,10 +1034,6 @@ Empty_sequence_handler:
|
|||||||
vg_lite_float_t x0, y0, x1, y1, length;
|
vg_lite_float_t x0, y0, x1, y1, length;
|
||||||
vg_lite_error_t error = VG_LITE_SUCCESS;
|
vg_lite_error_t error = VG_LITE_SUCCESS;
|
||||||
|
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_update_linear_grad %p", grad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Get shortcuts to the color ramp. */
|
/* Get shortcuts to the color ramp. */
|
||||||
ramp_length = grad->converted_length;
|
ramp_length = grad->converted_length;
|
||||||
color_ramp = grad->converted_ramp;
|
color_ramp = grad->converted_ramp;
|
||||||
@@ -1211,11 +1187,6 @@ Empty_sequence_handler:
|
|||||||
vg_lite_color_ramp_t * srcRampLast;
|
vg_lite_color_ramp_t * srcRampLast;
|
||||||
vg_lite_color_ramp_t * trgRamp;
|
vg_lite_color_ramp_t * trgRamp;
|
||||||
|
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_set_radial_grad %p %d %p (%f %f %f %f %f) %d %d", grad, count, color_ramp,
|
|
||||||
radial_grad.cx, radial_grad.cy, radial_grad.fx, radial_grad.fy, radial_grad.r, spread_mode, pre_multiplied);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Reset the count. */
|
/* Reset the count. */
|
||||||
trgCount = 0;
|
trgCount = 0;
|
||||||
|
|
||||||
@@ -1331,10 +1302,6 @@ Empty_sequence_handler:
|
|||||||
vg_lite_error_t error = VG_LITE_SUCCESS;
|
vg_lite_error_t error = VG_LITE_SUCCESS;
|
||||||
uint32_t align, mul, div;
|
uint32_t align, mul, div;
|
||||||
|
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_update_radial_grad %p", grad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Get shortcuts to the color ramp. */
|
/* Get shortcuts to the color ramp. */
|
||||||
ramp_length = grad->converted_length;
|
ramp_length = grad->converted_length;
|
||||||
colorRamp = grad->converted_ramp;
|
colorRamp = grad->converted_ramp;
|
||||||
@@ -1464,10 +1431,6 @@ Empty_sequence_handler:
|
|||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_set_grad %p %d %p %p", grad, count, colors, stops);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
grad->count = 0; /* Opaque B&W gradient */
|
grad->count = 0; /* Opaque B&W gradient */
|
||||||
if(!count || count > VLC_MAX_GRADIENT_STOPS || colors == NULL || stops == NULL)
|
if(!count || count > VLC_MAX_GRADIENT_STOPS || colors == NULL || stops == NULL)
|
||||||
return VG_LITE_SUCCESS;
|
return VG_LITE_SUCCESS;
|
||||||
@@ -1501,10 +1464,6 @@ Empty_sequence_handler:
|
|||||||
int32_t ds, dr, dg, db, da;
|
int32_t ds, dr, dg, db, da;
|
||||||
uint32_t * buffer = (uint32_t *)grad->image.memory;
|
uint32_t * buffer = (uint32_t *)grad->image.memory;
|
||||||
|
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_update_grad %p", grad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(grad->count == 0) {
|
if(grad->count == 0) {
|
||||||
/* If no valid stops have been specified (e.g., due to an empty input
|
/* If no valid stops have been specified (e.g., due to an empty input
|
||||||
* array, out-of-range, or out-of-order stops), a stop at 0 with color
|
* array, out-of-range, or out-of-order stops), a stop at 0 with color
|
||||||
@@ -1570,10 +1529,6 @@ Empty_sequence_handler:
|
|||||||
{
|
{
|
||||||
vg_lite_error_t error = VG_LITE_SUCCESS;
|
vg_lite_error_t error = VG_LITE_SUCCESS;
|
||||||
|
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_clear_linear_grad %p", grad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
grad->count = 0;
|
grad->count = 0;
|
||||||
/* Release the image resource. */
|
/* Release the image resource. */
|
||||||
if(grad->image.handle != NULL) {
|
if(grad->image.handle != NULL) {
|
||||||
@@ -1587,10 +1542,6 @@ Empty_sequence_handler:
|
|||||||
{
|
{
|
||||||
vg_lite_error_t error = VG_LITE_SUCCESS;
|
vg_lite_error_t error = VG_LITE_SUCCESS;
|
||||||
|
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_clear_grad %p", grad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
grad->count = 0;
|
grad->count = 0;
|
||||||
/* Release the image resource. */
|
/* Release the image resource. */
|
||||||
if(grad->image.handle != NULL) {
|
if(grad->image.handle != NULL) {
|
||||||
@@ -1604,10 +1555,6 @@ Empty_sequence_handler:
|
|||||||
{
|
{
|
||||||
vg_lite_error_t error = VG_LITE_SUCCESS;
|
vg_lite_error_t error = VG_LITE_SUCCESS;
|
||||||
|
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_clear_radial_grad %p", grad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
grad->count = 0;
|
grad->count = 0;
|
||||||
/* Release the image resource. */
|
/* Release the image resource. */
|
||||||
if(grad->image.handle != NULL) {
|
if(grad->image.handle != NULL) {
|
||||||
@@ -1619,28 +1566,16 @@ Empty_sequence_handler:
|
|||||||
|
|
||||||
vg_lite_matrix_t * vg_lite_get_linear_grad_matrix(vg_lite_ext_linear_gradient_t * grad)
|
vg_lite_matrix_t * vg_lite_get_linear_grad_matrix(vg_lite_ext_linear_gradient_t * grad)
|
||||||
{
|
{
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_get_linear_grad_matrix %p", grad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return &grad->matrix;
|
return &grad->matrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
vg_lite_matrix_t * vg_lite_get_grad_matrix(vg_lite_linear_gradient_t * grad)
|
vg_lite_matrix_t * vg_lite_get_grad_matrix(vg_lite_linear_gradient_t * grad)
|
||||||
{
|
{
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_get_grad_matrix %p", grad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return &grad->matrix;
|
return &grad->matrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
vg_lite_matrix_t * vg_lite_get_radial_grad_matrix(vg_lite_radial_gradient_t * grad)
|
vg_lite_matrix_t * vg_lite_get_radial_grad_matrix(vg_lite_radial_gradient_t * grad)
|
||||||
{
|
{
|
||||||
#if LV_VG_LITE_THORVG_TRACE_API
|
|
||||||
LV_LOG_USER("vg_lite_get_radial_grad_matrix %p", grad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return &grad->matrix;
|
return &grad->matrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2183,7 +2118,7 @@ static Result picture_load(vg_lite_ctx * ctx, std::unique_ptr<Picture> & picture
|
|||||||
uint32_t * image_buffer;
|
uint32_t * image_buffer;
|
||||||
LV_ASSERT(VG_LITE_IS_ALIGNED(source->memory, LV_VG_LITE_THORVG_BUF_ADDR_ALIGN));
|
LV_ASSERT(VG_LITE_IS_ALIGNED(source->memory, LV_VG_LITE_THORVG_BUF_ADDR_ALIGN));
|
||||||
|
|
||||||
#ifdef LV_VG_LITE_THORVG_16PIXELS_ALIGN
|
#if LV_VG_LITE_THORVG_16PIXELS_ALIGN
|
||||||
LV_ASSERT(VG_LITE_IS_ALIGNED(source->width, 16));
|
LV_ASSERT(VG_LITE_IS_ALIGNED(source->width, 16));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -83,7 +83,6 @@ typedef void * lv_user_data_t;
|
|||||||
/* Simulate VG-Lite hardware using ThorVG */
|
/* Simulate VG-Lite hardware using ThorVG */
|
||||||
#define LV_USE_VG_LITE_THORVG 1
|
#define LV_USE_VG_LITE_THORVG 1
|
||||||
|
|
||||||
#define LV_VG_LITE_THORVG_TRACE_API 1
|
|
||||||
#include "lv_test_conf_full.h"
|
#include "lv_test_conf_full.h"
|
||||||
#elif LV_TEST_OPTION == 4
|
#elif LV_TEST_OPTION == 4
|
||||||
#define LV_COLOR_DEPTH 24
|
#define LV_COLOR_DEPTH 24
|
||||||
|
|||||||
Reference in New Issue
Block a user