/* KWin - the KDE window manager This file is part of the KDE project. SPDX-FileCopyrightText: 2018 Roman Gilg SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include "core/output.h" #include #include namespace KWin { class SoftwareVsyncMonitor; class VirtualBackend; class OutputFrame; class VirtualOutput : public Output { Q_OBJECT public: VirtualOutput(VirtualBackend *parent, bool internal); ~VirtualOutput() override; RenderLoop *renderLoop() const override; void present(const std::shared_ptr &frame); void init(const QPoint &logicalPosition, const QSize &pixelSize, qreal scale); void updateEnabled(bool enabled); private: void vblank(std::chrono::nanoseconds timestamp); Q_DISABLE_COPY(VirtualOutput); friend class VirtualBackend; VirtualBackend *m_backend; std::unique_ptr m_renderLoop; std::unique_ptr m_vsyncMonitor; int m_gammaSize = 200; bool m_gammaResult = true; int m_identifier; std::shared_ptr m_frame; }; } // namespace KWin