mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00: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.
54 lines
2.1 KiB
C++
54 lines
2.1 KiB
C++
/*
|
|
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Try.h>
|
|
#include <Kernel/Graphics/Console/GenericFramebufferConsole.h>
|
|
#include <Kernel/Graphics/DisplayConnector.h>
|
|
#include <Kernel/Graphics/VMWare/GraphicsAdapter.h>
|
|
#include <Kernel/Library/LockRefPtr.h>
|
|
#include <Kernel/Locking/Spinlock.h>
|
|
#include <Kernel/Memory/TypedMapping.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class VMWareFramebufferConsole;
|
|
class VMWareDisplayConnector : public DisplayConnector {
|
|
friend class VMWareGraphicsAdapter;
|
|
friend class VMWareFramebufferConsole;
|
|
friend class DeviceManagement;
|
|
|
|
public:
|
|
static NonnullLockRefPtr<VMWareDisplayConnector> must_create(VMWareGraphicsAdapter const& parent_adapter, PhysicalAddress framebuffer_address, size_t framebuffer_resource_size);
|
|
|
|
private:
|
|
VMWareDisplayConnector(VMWareGraphicsAdapter const& parent_adapter, PhysicalAddress framebuffer_address, size_t framebuffer_resource_size);
|
|
ErrorOr<void> create_attached_framebuffer_console();
|
|
|
|
virtual bool mutable_mode_setting_capable() const override { return true; }
|
|
virtual bool double_framebuffering_capable() const override { return false; }
|
|
virtual ErrorOr<void> set_mode_setting(ModeSetting const&) override;
|
|
virtual ErrorOr<void> set_safe_mode_setting() override;
|
|
virtual ErrorOr<void> set_y_offset(size_t y) override;
|
|
virtual ErrorOr<void> unblank() override;
|
|
|
|
virtual bool partial_flush_support() const override { return true; }
|
|
virtual bool flush_support() const override { return true; }
|
|
// Note: Paravirtualized hardware doesn't require a defined refresh rate for modesetting.
|
|
virtual bool refresh_rate_support() const override { return false; }
|
|
|
|
virtual ErrorOr<void> flush_first_surface() override;
|
|
virtual ErrorOr<void> flush_rectangle(size_t buffer_index, FBRect const& rect) override;
|
|
|
|
virtual void enable_console() override;
|
|
virtual void disable_console() override;
|
|
|
|
private:
|
|
NonnullLockRefPtr<VMWareGraphicsAdapter> m_parent_adapter;
|
|
LockRefPtr<VMWareFramebufferConsole> m_framebuffer_console;
|
|
};
|
|
}
|