mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
Kernel: Put VirtIOGPU related types into a namespace
This commit is contained in:
parent
215f383b12
commit
1c77f80676
12 changed files with 326 additions and 300 deletions
44
Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h
Normal file
44
Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Sahan Fernando <sahan.h.fernando@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/Graphics/VirtIOGPU/Console.h>
|
||||
#include <Kernel/Graphics/VirtIOGPU/FrameBufferDevice.h>
|
||||
#include <Kernel/Graphics/VirtIOGPU/VirtIOGPU.h>
|
||||
|
||||
namespace Kernel::Graphics::VirtIOGPU {
|
||||
|
||||
class GraphicsAdapter final
|
||||
: public GraphicsDevice
|
||||
, public PCI::DeviceController {
|
||||
AK_MAKE_ETERNAL
|
||||
|
||||
public:
|
||||
static NonnullRefPtr<GraphicsAdapter> initialize(PCI::Address);
|
||||
|
||||
virtual bool framebuffer_devices_initialized() const override { return m_created_framebuffer_devices; }
|
||||
|
||||
private:
|
||||
explicit GraphicsAdapter(PCI::Address base_address);
|
||||
|
||||
virtual void initialize_framebuffer_devices() override;
|
||||
virtual Type type() const override { return Type::Raw; }
|
||||
|
||||
virtual void enable_consoles() override;
|
||||
virtual void disable_consoles() override;
|
||||
|
||||
virtual bool modesetting_capable() const override { return false; }
|
||||
virtual bool double_framebuffering_capable() const override { return false; }
|
||||
|
||||
virtual bool try_to_set_resolution(size_t, size_t, size_t) override { return false; }
|
||||
virtual bool set_y_offset(size_t, size_t) override { return false; }
|
||||
|
||||
RefPtr<GPU> m_gpu_device;
|
||||
bool m_created_framebuffer_devices { false };
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue