summaryrefslogtreecommitdiff
path: root/video/compositor.c
blob: 6ca6bd2273b0a20c9e2047a7749fa72871e1a50d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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?
}