23 #include "ui_drawing.h"
33 BSP_DECLARE_WEAK_FCNT DRAWING_Status
UI_DISPLAY_BRS_restore(MICROUI_GraphicsContext *gc, MICROUI_Image *old_back_buffer,
36 uint32_t bpp = LLUI_DISPLAY_getImageBPP(old_back_buffer);
37 uint32_t width = UI_RECT_get_width(rect);
38 uint32_t height = UI_RECT_get_height(rect);
43 ret = UI_DRAWING_copyImage(gc, old_back_buffer, rect->x1, rect->y1, width, height, rect->x1, rect->y1);
45 uint8_t *dst = LLUI_DISPLAY_getBufferAddress(&gc->image);
46 uint8_t *src = LLUI_DISPLAY_getBufferAddress(old_back_buffer);
47 uint32_t stride = LLUI_DISPLAY_getStrideInBytes(&gc->image);
49 dst += rect->y1 * stride;
50 src += rect->y1 * stride;
52 if ((0 == rect->x1) && (old_back_buffer->width == width)) {
54 (void)memcpy(dst, src, stride * height);
57 dst += rect->x1 * bpp / 8u;
58 src += rect->x1 * bpp / 8u;
59 uint32_t size = width * bpp / 8u;
61 for (uint32_t y = 0; y < height; y++) {
62 (void)memcpy(dst, src, size);
72 LLUI_DISPLAY_IMPL_notifyDrawingSoft(gc);
Provides some implementations of the LLUI_DISPLAY_impl.h functions relating to the display buffer str...
DRAWING_Status UI_DISPLAY_BRS_restore(MICROUI_GraphicsContext *gc, MICROUI_Image *old_back_buffer, ui_rect_t *rect)
Restores (copies) the given rectangular region from old back buffer to the graphics context's current...