perf(sdl): optimize the use of SDL_RenderSetClipRect (#2941)

* reduce SDL_RenderSetClipRect as much as possible

* added some comments

* removing draw_sw usage

* fixed import

* implemented polygon drawing

* supports subimage for sdl texture based images

* fixed formatting

* removed unused code

* cleanup

* cleanup

* formatted code
This commit is contained in:
Mariotaku
2022-01-05 18:01:18 +09:00
committed by GitHub
parent edb207e27c
commit 9bbf661dd4
14 changed files with 387 additions and 208 deletions

View File

@@ -20,7 +20,8 @@ extern "C" {
#include LV_GPU_SDL_INCLUDE_PATH
#include "../sw/lv_draw_sw.h"
#include "../lv_draw.h"
#include "../../core/lv_disp.h"
/*********************
* DEFINES
@@ -46,7 +47,7 @@ typedef struct {
} lv_draw_sdl_drv_param_t;
typedef struct {
lv_draw_sw_ctx_t base_draw;
lv_draw_ctx_t base_draw;
SDL_Renderer * renderer;
struct lv_draw_sdl_context_internals_t * internals;
} lv_draw_sdl_ctx_t;