diff options
Diffstat (limited to 'video')
| -rw-r--r-- | video/compositor.c | 27 | ||||
| -rw-r--r-- | video/compositor.h | 3 |
2 files changed, 30 insertions, 0 deletions
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? +} + + diff --git a/video/compositor.h b/video/compositor.h new file mode 100644 index 0000000..cef0c47 --- /dev/null +++ b/video/compositor.h @@ -0,0 +1,3 @@ +#include <stdint.h> + +void compositor_init(uint16_t width, uint16_t height, uint16_t pitch); |
