KWin
Loading...
Searching...
No Matches
placeholderoutput.cpp
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "placeholderoutput.h"
8
9namespace KWin
10{
11
12PlaceholderOutput::PlaceholderOutput(const QSize &size, qreal scale)
13{
14 auto mode = std::make_shared<OutputMode>(size, 60000);
15
16 m_renderLoop = std::make_unique<RenderLoop>(this);
17 m_renderLoop->setRefreshRate(mode->refreshRate());
18 m_renderLoop->inhibit();
19
21 .scale = scale,
22 .modes = {mode},
23 .currentMode = mode,
24 .enabled = true,
25 });
26
28 .name = QStringLiteral("Placeholder-1"),
29 .placeholder = true,
30 });
31}
32
36
38{
39 return m_renderLoop.get();
40}
41
42} // namespace KWin
43
44#include "moc_placeholderoutput.cpp"
qreal scale() const
Definition output.cpp:455
void setInformation(const Information &information)
Definition output.cpp:556
void setState(const State &state)
Definition output.cpp:562
PlaceholderOutput(const QSize &size, qreal scale=1)
RenderLoop * renderLoop() const override