mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
11eee67b85
Until now, our kernel has reimplemented a number of AK classes to provide automatic internal locking: - RefPtr - NonnullRefPtr - WeakPtr - Weakable This patch renames the Kernel classes so that they can coexist with the original AK classes: - RefPtr => LockRefPtr - NonnullRefPtr => NonnullLockRefPtr - WeakPtr => LockWeakPtr - Weakable => LockWeakable The goal here is to eventually get rid of the Lock* classes in favor of using external locking.
30 lines
911 B
C++
30 lines
911 B
C++
/*
|
|
* 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 NonnullLockRefPtr<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;
|
|
};
|
|
|
|
}
|