Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsgsoftwarethreadedrenderloop_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSGSOFTWARETHREADEDRENDERLOOP_H
5#define QSGSOFTWARETHREADEDRENDERLOOP_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qsgrenderloop_p.h>
19
21
24
26{
28public:
31
32 void show(QQuickWindow *window) override;
33 void hide(QQuickWindow *window) override;
34 void resize(QQuickWindow *window) override;
35 void windowDestroyed(QQuickWindow *window) override;
36 void exposureChanged(QQuickWindow *window) override;
37 QImage grab(QQuickWindow *window) override;
38 void update(QQuickWindow *window) override;
39 void maybeUpdate(QQuickWindow *window) override;
41 QAnimationDriver *animationDriver() const override;
42 QSGContext *sceneGraphContext() const override;
44 void releaseResources(QQuickWindow *window) override;
45 void postJob(QQuickWindow *window, QRunnable *job) override;
47 bool interleaveIncubation() const override;
48 int flags() const override;
49
50 bool event(QEvent *e) override;
51
52public Q_SLOTS:
53 void onAnimationStarted();
54 void onAnimationStopped();
55
56private:
57 struct WindowData {
58 QQuickWindow *window;
60 uint updateDuringSync : 1;
61 uint forceRenderPass : 1;
62 };
63
64 WindowData *windowFor(QQuickWindow *window);
65
66 void startOrStopAnimationTimer();
67 void handleExposure(QQuickWindow *window);
68 void handleObscurity(WindowData *w);
69 void scheduleUpdate(WindowData *w);
70 void handleResourceRelease(WindowData *w, bool destroying);
71 void polishAndSync(WindowData *w, bool inExpose);
72
74 QAnimationDriver *m_anim;
75 int animationTimer = 0;
76 bool lockedForSync = false;
77 QList<WindowData> m_windows;
78
80};
81
83
84#endif // QSGSOFTWARETHREADEDRENDERLOOP_H
\inmodule QtCore
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtGui
Definition qimage.h:37
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore
Definition qrunnable.h:18
The QSGContext holds the scene graph entry points for one QML engine.
void exposureChanged(QQuickWindow *window) override
QAnimationDriver * animationDriver() const override
void resize(QQuickWindow *window) override
void handleUpdateRequest(QQuickWindow *window) override
void update(QQuickWindow *window) override
void windowDestroyed(QQuickWindow *window) override
QImage grab(QQuickWindow *window) override
void maybeUpdate(QQuickWindow *window) override
void releaseResources(QQuickWindow *window) override
QSGContext * sceneGraphContext() const override
QSurface::SurfaceType windowSurfaceType() const override
QSGRenderContext * createRenderContext(QSGContext *) const override
void postJob(QQuickWindow *window, QRunnable *job) override
SurfaceType
The SurfaceType enum describes what type of surface this is.
Definition qsurface.h:30
Combined button and popup list for selecting options.
GLfloat GLfloat GLfloat w
[0]
struct _cl_event * event
#define Q_OBJECT
#define Q_SLOTS
unsigned int uint
Definition qtypes.h:34
view show()
[18] //! [19]
edit hide()
aWidget window() -> setWindowTitle("New Window Title")
[2]