blob: 6d8159f814f0b904f1e227c5a531f7580e1b79f0 (
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
28
29
30
|
/*
* Copyright (c) 2021, Sahan Fernando <sahan.h.fernando@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <Kernel/Graphics/Console/GenericFramebufferConsole.h>
namespace Kernel::Graphics {
class ContiguousFramebufferConsole final : public GenericFramebufferConsole {
public:
static NonnullRefPtr<ContiguousFramebufferConsole> initialize(PhysicalAddress, size_t width, size_t height, size_t pitch);
virtual void set_resolution(size_t width, size_t height, size_t pitch) override;
virtual void flush(size_t, size_t, size_t, size_t) override { }
private:
virtual u8* framebuffer_data() override
{
return m_framebuffer_region->vaddr().as_ptr();
}
OwnPtr<Region> m_framebuffer_region;
ContiguousFramebufferConsole(PhysicalAddress, size_t width, size_t height, size_t pitch);
PhysicalAddress m_framebuffer_address;
};
}
|