ladybird/Kernel/BochsVGADevice.h
Andreas Kling 443d1c2237 WindowServer: Coordinate double-buffering with the BochsVGA card.
Use the BochsVGA card's virtual-height + virtual-y features to implement
a "hardware double buffering" type scheme.

This is a performance degradation since we now draw a bunch more than before.
But there's also no tearing or cursor flickering. I'm gonna commit this and
try to improve upon it. :^)
2019-02-07 08:56:26 +01:00

25 lines
563 B
C++

#pragma once
#include <AK/Types.h>
#include <AK/AKString.h>
#include <Kernel/types.h>
// FIXME: This should be a BlockDevice once we have BlockDevice.
class BochsVGADevice {
AK_MAKE_ETERNAL
public:
static BochsVGADevice& the();
BochsVGADevice();
PhysicalAddress framebuffer_address() const { return m_framebuffer_address; }
void set_resolution(int width, int height);
void set_y_offset(int);
private:
void set_register(word index, word value);
dword find_framebuffer_address();
PhysicalAddress m_framebuffer_address;
};