Debian Codegraph @

lvgl/src/draw/renesas/dave2d/lv_draw_dave2d_mask_rectangle.c

raw symbols SCIP
1 #include "lv_draw_dave2d.h"
2 #if LV_USE_DRAW_DAVE2D
3
4 #include "../../../misc/lv_area_private.h"
5
6 void lv_draw_dave2d_mask_rect(lv_draw_task_t * t, const lv_draw_mask_rect_dsc_t * dsc,
7 const lv_area_t * coords)
8 {
9 lv_area_t clipped_area;
10 lv_area_t coordinates;
11 int32_t x;
12 int32_t y;
13
14 lv_draw_dave2d_unit_t * u = (lv_draw_dave2d_unit_t *)t->draw_unit;
15
16 if(!lv_area_intersect(&clipped_area, coords, &t->clip_area)) return;
17
18 x = 0 - t->target_layer->buf_area.x1;
19 y = 0 - t->target_layer->buf_area.y1;
20
21 coordinates = *coords;
22
23 lv_area_move(&clipped_area, x, y);
24 lv_area_move(&coordinates, x, y);
25
26 #if LV_USE_OS
27 lv_result_t status;
28 status = lv_mutex_lock(u->pd2Mutex);
29 LV_ASSERT(LV_RESULT_OK == status);
30 #endif
31
32 d2_framebuffer_from_layer(u->d2_handle, t->target_layer);
33
34 d2_cliprect(u->d2_handle, (d2_border)clipped_area.x1, (d2_border)clipped_area.y1, (d2_border)clipped_area.x2,
35 (d2_border)clipped_area.y2);
36
37 d2_renderbox(u->d2_handle,
38 (d2_point) D2_FIX4(coordinates.x1),
39 (d2_point) D2_FIX4(coordinates.y1),
40 (d2_width) D2_FIX4(lv_area_get_width(&coordinates)),
41 (d2_width) D2_FIX4(lv_area_get_height(&coordinates)));
42
43 #if LV_USE_OS
44 status = lv_mutex_unlock(u->pd2Mutex);
45 LV_ASSERT(LV_RESULT_OK == status);
46 #endif
47 }
48 #endif //LV_USE_DRAW_DAVE2D