KWin
Loading...
Searching...
No Matches
presentationtime.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6#pragma once
7
8#include <QObject>
9#include <chrono>
10
11#include "core/renderbackend.h"
12#include "effect/globals.h"
13#include "wayland/qwayland-server-presentation-time.h"
14
15namespace KWin
16{
17
18class Display;
19class SurfaceInterface;
20
21class PresentationTime : public QObject, QtWaylandServer::wp_presentation
22{
23 Q_OBJECT
24public:
25 explicit PresentationTime(Display *display, QObject *parent);
26
27private:
28 void wp_presentation_bind_resource(Resource *resource) override;
29 void wp_presentation_destroy(Resource *resource) override;
30 void wp_presentation_feedback(Resource *resource, wl_resource *surface, uint32_t callback) override;
31};
32
34{
35public:
38
39 wl_list resources;
40
41 void presented(std::chrono::nanoseconds refreshCycleDuration, std::chrono::nanoseconds timestamp, PresentationMode mode) override;
42};
43
44}
Class holding the Wayland server display loop.
Definition display.h:34
void presented(std::chrono::nanoseconds refreshCycleDuration, std::chrono::nanoseconds timestamp, PresentationMode mode) override
PresentationTime(Display *display, QObject *parent)
PresentationMode
Definition globals.h:276
struct _XDisplay Display