KWin
Loading...
Searching...
No Matches
src
utils
softwarevsyncmonitor.h
Go to the documentation of this file.
1
/*
2
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4
SPDX-License-Identifier: GPL-2.0-or-later
5
*/
6
7
#pragma once
8
9
#include "
utils/vsyncmonitor.h
"
10
11
#include <QTimer>
12
#include <memory>
13
14
namespace
KWin
15
{
16
25
class
KWIN_EXPORT
SoftwareVsyncMonitor
:
public
VsyncMonitor
26
{
27
Q_OBJECT
28
29
public
:
30
static
std::unique_ptr<SoftwareVsyncMonitor> create();
31
32
int
refreshRate()
const
;
33
void
setRefreshRate(
int
refreshRate);
34
35
public
Q_SLOTS:
36
void
arm()
override
;
37
38
private
:
39
explicit
SoftwareVsyncMonitor
();
40
void
handleSyntheticVsync();
41
42
QTimer m_softwareClock;
43
int
m_refreshRate = 60000;
44
std::chrono::nanoseconds m_vblankTimestamp = std::chrono::nanoseconds::zero();
45
};
46
47
}
// namespace KWin
KWin::SoftwareVsyncMonitor
Definition
softwarevsyncmonitor.h:26
KWin::VsyncMonitor
Definition
vsyncmonitor.h:22
KWin
Definition
activation_test.cpp:20
vsyncmonitor.h
Generated on Sat Feb 17 2024 01:42:10 for KWin by
1.10.0