/* * Copyright (c) 2021, Sahan Fernando * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace Kernel::Graphics { class ContiguousFramebufferConsole final : public GenericFramebufferConsole { public: static NonnullRefPtr 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 m_framebuffer_region; ContiguousFramebufferConsole(PhysicalAddress, size_t width, size_t height, size_t pitch); PhysicalAddress m_framebuffer_address; }; }