/* * Copyright (c) 2022, kleines Filmröllchen * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "ScreenBackend.h" #include "ScreenLayout.h" #include #include #include namespace WindowServer { class VirtualScreenBackend : public ScreenBackend { public: virtual ~VirtualScreenBackend(); VirtualScreenBackend() = default; private: friend class Screen; virtual ErrorOr open() override; virtual void set_head_buffer(int index) override; virtual ErrorOr flush_framebuffer_rects(int, ReadonlySpan) override { return {}; } virtual ErrorOr flush_framebuffer() override { return {}; } virtual ErrorOr unmap_framebuffer() override; virtual ErrorOr map_framebuffer() override; virtual ErrorOr set_safe_head_mode_setting() override; virtual ErrorOr set_head_mode_setting(GraphicsHeadModeSetting) override; virtual ErrorOr get_head_mode_setting() override; int m_height { 0 }; int m_width { 0 }; bool m_first_buffer_active { true }; }; }