KWin
Loading...
Searching...
No Matches
x11_standalone_omlsynccontrolvsyncmonitor.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
10
11#include <epoxy/glx.h>
12#include <fixx11h.h>
13
14#include <QThread>
15#include <memory>
16
17namespace KWin
18{
19
25{
26 Q_OBJECT
27
28public:
31
32 bool isValid() const;
33
34public Q_SLOTS:
35 void poll();
36
37Q_SIGNALS:
39 void vblankOccurred(std::chrono::nanoseconds timestamp);
40
41private:
42 Display *m_display = nullptr;
43 ::Window m_dummyWindow = 0;
44 GLXContext m_localContext = 0;
45 GLXDrawable m_drawable = 0;
46};
47
57{
58 Q_OBJECT
59
60public:
61 static std::unique_ptr<OMLSyncControlVsyncMonitor> create();
63
64 bool isValid() const;
65
66public Q_SLOTS:
67 void arm() override;
68
69private:
71
72 QThread m_thread;
74};
75
76} // namespace KWin
Class holding the Wayland server display loop.
Definition display.h:34
void vblankOccurred(std::chrono::nanoseconds timestamp)
static std::unique_ptr< OMLSyncControlVsyncMonitor > create()