2022-04-02 00:30:52 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ScreenBackend.h"
|
|
|
|
#include "ScreenLayout.h"
|
|
|
|
#include <AK/Error.h>
|
|
|
|
#include <AK/Span.h>
|
|
|
|
|
|
|
|
namespace WindowServer {
|
|
|
|
|
|
|
|
class VirtualScreenBackend : public ScreenBackend {
|
|
|
|
public:
|
|
|
|
virtual ~VirtualScreenBackend();
|
|
|
|
|
|
|
|
VirtualScreenBackend() = default;
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend class Screen;
|
|
|
|
|
|
|
|
virtual ErrorOr<void> open() override;
|
|
|
|
|
|
|
|
virtual void set_head_buffer(int index) override;
|
|
|
|
|
2023-02-05 19:02:54 +00:00
|
|
|
virtual ErrorOr<void> flush_framebuffer_rects(int, ReadonlySpan<FBRect>) override { return {}; }
|
2022-04-02 00:30:52 +02:00
|
|
|
|
2022-04-30 13:55:00 +03:00
|
|
|
virtual ErrorOr<void> flush_framebuffer() override { return {}; }
|
|
|
|
|
2022-04-02 00:30:52 +02:00
|
|
|
virtual ErrorOr<void> unmap_framebuffer() override;
|
|
|
|
virtual ErrorOr<void> map_framebuffer() override;
|
|
|
|
|
2022-09-24 16:59:08 +03:00
|
|
|
virtual ErrorOr<void> set_safe_head_mode_setting() override;
|
|
|
|
|
2022-04-30 15:27:42 +03:00
|
|
|
virtual ErrorOr<void> set_head_mode_setting(GraphicsHeadModeSetting) override;
|
|
|
|
virtual ErrorOr<GraphicsHeadModeSetting> get_head_mode_setting() override;
|
2022-04-02 00:30:52 +02:00
|
|
|
|
|
|
|
int m_height { 0 };
|
|
|
|
int m_width { 0 };
|
|
|
|
bool m_first_buffer_active { true };
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|