/* KWin - the KDE window manager This file is part of the KDE project. SPDX-FileCopyrightText: 2018 Roman Gilg SPDX-FileCopyrightText: 2021 Xaver Hugl SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include "drm_abstract_output.h" #include #include namespace KWin { class SoftwareVsyncMonitor; class VirtualBackend; class DrmPipelineLayer; class DrmVirtualOutput : public DrmAbstractOutput { Q_OBJECT public: explicit DrmVirtualOutput(DrmBackend *backend, const QString &name, const QSize &size, qreal scale); ~DrmVirtualOutput() override; bool present(const std::shared_ptr &frame) override; DrmOutputLayer *primaryLayer() const override; DrmOutputLayer *cursorLayer() const override; void recreateSurface(); private: void vblank(std::chrono::nanoseconds timestamp); void setDpmsMode(DpmsMode mode) override; DrmBackend *const m_backend; std::shared_ptr m_layer; std::shared_ptr m_frame; std::unique_ptr m_vsyncMonitor; }; }