summaryrefslogtreecommitdiff
path: root/video/compositor.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/compositor.c')
-rw-r--r--video/compositor.c27
1 files changed, 27 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?
+}
+
+