mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
443d1c2237
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. :^)
25 lines
563 B
C++
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;
|
|
};
|