blob: 692631635fb2c382f9ed64f6b3f93b61ad93cdb9 (
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<Memory::Region> m_framebuffer_region;
ContiguousFramebufferConsole(PhysicalAddress, size_t width, size_t height, size_t pitch);
PhysicalAddress m_framebuffer_address;
};
}
|