From be3d9f2cf2a8cfe670eac6df255db55ff9205c49 Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 28 Sep 2018 19:24:18 +0200 Subject: started workin on foolish window composer --- video/compositor.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 video/compositor.c (limited to 'video/compositor.c') diff --git a/video/compositor.c b/video/compositor.c new file mode 100644 index 0000000..6ca6bd2 --- /dev/null +++ b/video/compositor.c @@ -0,0 +1,27 @@ +#include "compositor.h" + +#include "kernel.h" +#include "kmalloc.h" +#include "log.h" + +#include "lib/string/string.h" + +static uint32_t backbuffer[VESA_MAX_WIDTH*VESA_MAX_HEIGHT]; + +static uint16_t vesa_width; +static uint16_t vesa_height; +static uint16_t vesa_pitch; + +void compositor_init(uint16_t width, uint16_t height, uint16_t pitch) +{ + vesa_width=width; + vesa_height=height; + klog("initialized composing window manager to %d x %d",width,height); +} + +void compositor_swap_buffers() +{ + memcpy(VMEM_FRAMEBUFFER,backbuffer,vesa_height*vesa_pitch/4);// TODO optimize? rects only too? +} + + -- cgit v1.2.3