summaryrefslogtreecommitdiffstats
path: root/src/window-lib/systemframetimerimpl.h
blob: e2193312d004c7a989ae2b9d8c3fb4c196276c13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (C) 2023 The Qt Company Ltd.
// Copyright (C) 2019 Luxoft Sweden AB
// Copyright (C) 2018 Pelagicore AG
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef SYSTEMFRAMETIMERIMPL_H
#define SYSTEMFRAMETIMERIMPL_H

#include <QtCore/QPointer>
#include <QtAppManSharedMain/frametimerimpl.h>
#include <QtAppManCommon/global.h>


QT_FORWARD_DECLARE_CLASS(QWaylandQuickSurface)

QT_BEGIN_NAMESPACE_AM

class SystemFrameTimerImpl : public FrameTimerImpl
{
public:
    SystemFrameTimerImpl(FrameTimer *frameTimer);

    bool connectToSystemWindow(QObject *window) override;
    void disconnectFromSystemWindow(QObject *window) override;

private:
#if QT_CONFIG(am_multi_process)
    QMetaObject::Connection m_surfaceChangeConnection;
    QMetaObject::Connection m_redrawConnection;
#endif
};

QT_END_NAMESPACE_AM

#endif // SYSTEMFRAMETIMERIMPL_H