config LV_USE_DRAW_SW
	bool "SW renderer"
	default y
	help
		Required to draw anything on the screen.

if LV_USE_DRAW_SW

menu "Supported color formats"

config LV_DRAW_SW_SUPPORT_RGB565
	bool "RGB565"
	default y

config LV_DRAW_SW_SUPPORT_RGB565_SWAPPED
	bool "RGB565 swapped"
	default y

config LV_DRAW_SW_SUPPORT_RGB565A8
	bool "RGB565A8"
	default y

config LV_DRAW_SW_SUPPORT_RGB888
	bool "RGB888"
	default y

config LV_DRAW_SW_SUPPORT_XRGB8888
	bool "XRGB8888"
	default y

config LV_DRAW_SW_SUPPORT_ARGB8888
	bool "ARGB8888"
	default y

config LV_DRAW_SW_SUPPORT_ARGB8888_PREMULTIPLIED
	bool "ARGB8888 premultiplied"
	default y

config LV_DRAW_SW_SUPPORT_L8
	bool "L8"
	default y

config LV_DRAW_SW_SUPPORT_AL88
	bool "AL88"
	default y

config LV_DRAW_SW_SUPPORT_A8
	bool "A8"
	default y

config LV_DRAW_SW_SUPPORT_I1
	bool "I1"
	default y

config LV_DRAW_SW_I1_LUM_THRESHOLD
	int "I1 luminance threshold"
	default 127
	range 0 254
	depends on LV_DRAW_SW_SUPPORT_I1
	help
		Pixels brighter than this luminance become active (set) when rendering to I1.

endmenu

config LV_DRAW_SW_DRAW_UNIT_CNT
	int "Number of draw units"
	default 1
	range 1 255
	depends on !LV_OS_NONE
	help
		Number of threads used to render a frame in parallel

config LV_USE_DRAW_ARM2D_SYNC
	bool "Arm-2D acceleration (Cortex-M)"
	default n
	help
		Requires the Arm-2D library in your project and an include path for "arm_2d.h".

config LV_USE_NATIVE_HELIUM_ASM
	bool "Native Helium assembly"
	default n
	help
		Disable to let Arm-2D work on its own (for testing only).

config LV_DRAW_SW_COMPLEX
	bool "Complex draw engine"
	default y
	help
		Adds rounded corners, shadows, skewed lines and arcs.
		Without it only rectangles with gradients, images, texts and straight lines can be drawn.

config LV_GRADIENT_MAX_STOPS
	int "Maximum gradient stops"
	default 2
	help
		Each additional stop costs (sizeof(lv_color_t) + 1) bytes.

config LV_USE_DRAW_SW_COMPLEX_GRADIENTS
	bool "Complex gradients"
	default n

	help
		Adds linear gradients at an angle, plus radial and conical gradients.

config LV_DRAW_SW_SHADOW_CACHE_SIZE
	int "Shadow cache size"
	depends on LV_DRAW_SW_COMPLEX
	default 0
	help
		Maximum shadow size to buffer, where shadow size is `shadow_width + radius`.
		Costs this value squared in RAM; 0 disables caching.

config LV_DRAW_SW_CIRCLE_CACHE_SIZE
	int "Circle cache size"
	depends on LV_DRAW_SW_COMPLEX
	default 4
	help
		The circumference of a 1/4 circle is cached for anti-aliasing, costing
		radius * 4 bytes per circle. Set to 0 to disable caching.

choice LV_USE_DRAW_SW_ASM
	prompt "SW assembly optimization"
	default LV_DRAW_SW_ASM_NONE

	config LV_DRAW_SW_ASM_NONE
		bool "0: None"
	config LV_DRAW_SW_ASM_NEON
		bool "1: NEON"
	config LV_DRAW_SW_ASM_HELIUM
		bool "2: Helium"
	config LV_DRAW_SW_ASM_RISCV_V
		bool "3: RISC-V Vector"
	config LV_DRAW_SW_ASM_SVE2
		bool "4: SVE2"
	config LV_DRAW_SW_ASM_CUSTOM
		bool "255: Custom"
		select LV_DRAW_SW_ASM_USE_CUSTOM_INCLUDE
endchoice

config LV_USE_DRAW_SW_ASM
	int
	default 0 if LV_DRAW_SW_ASM_NONE
	default 1 if LV_DRAW_SW_ASM_NEON
	default 2 if LV_DRAW_SW_ASM_HELIUM
	default 3 if LV_DRAW_SW_ASM_RISCV_V
	default 4 if LV_DRAW_SW_ASM_SVE2
	default 255 if LV_DRAW_SW_ASM_CUSTOM

config LV_DRAW_SW_ASM_USE_CUSTOM_INCLUDE
	bool

config LV_DRAW_SW_ASM_CUSTOM_INCLUDE
	string "Custom assembly include file"
	default ""
	depends on LV_DRAW_SW_ASM_CUSTOM

endif #LV_USE_DRAW_SW
