7#include <QtCore/QCoreApplication>
8#include <QtCore/QElapsedTimer>
10#include <private/qquickanimatorcontroller_p.h>
11#include <private/qquickwindow_p.h>
12#include <private/qquickprofiler_p.h>
14#include <qtquick_tracepoints_p.h>
36 data.updatePending =
false;
37 data.grabOnly =
false;
55 d->cleanupNodesOnShutdown();
65 d->animationController.reset();
154 bool alsoSwap =
data.updatePending;
155 data.updatePending =
false;
157 if (!
data.grabOnly) {
164 qint64 renderTime = 0, syncTime = 0, polishTime = 0;
165 bool profileFrames = QSG_OPENVG_LOG_TIME_RENDERLOOP().isDebugEnabled();
169 Q_TRACE(QSG_polishItems_entry);
177 QQuickProfiler::SceneGraphRenderLoopFrame,
178 QQuickProfiler::SceneGraphPolishPolish);
190 QQuickProfiler::SceneGraphRenderLoopSync);
194 vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
196 vgTranslate(0.0f,
window->size().height());
205 QQuickProfiler::SceneGraphRenderLoopRender);
210 data.grabOnly =
false;
213 if (alsoSwap &&
window->isVisible()) {
223 QQuickProfiler::SceneGraphRenderLoopSwap);
225 if (QSG_OPENVG_LOG_TIME_RENDERLOOP().isDebugEnabled()) {
227 qCDebug(QSG_OPENVG_LOG_TIME_RENDERLOOP,
228 "Frame rendered with 'basic' renderloop in %dms, polish=%d, sync=%d, render=%d, swap=%d, frameDelta=%d",
229 int(swapTime / 1000000),
230 int(polishTime / 1000000),
231 int((syncTime - polishTime) / 1000000),
232 int((renderTime - syncTime) / 1000000),
233 int((swapTime - renderTime) / 10000000),
239 if (
data.updatePending)
void start() noexcept
Starts this timer.
qint64 nsecsElapsed() const noexcept
QImage readFramebuffer(const QSize &size)
void flushFrameSynchronousEvents(QQuickWindow *win)
static QQuickWindowPrivate * get(QQuickWindow *c)
QSGRenderContext * context
QQuickDeliveryAgentPrivate * deliveryAgentPrivate() const
bool isRenderable() const
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
The QSGContext holds the scene graph entry points for one QML engine.
virtual QSGRenderContext * createRenderContext()=0
static QSGContext * createDefaultContext()
Creates a default scene graph context for the current hardware.
void show(QQuickWindow *window) override
QImage grab(QQuickWindow *window) override
QHash< QQuickWindow *, WindowData > m_windows
void handleUpdateRequest(QQuickWindow *window) override
void exposureChanged(QQuickWindow *window) override
void maybeUpdate(QQuickWindow *window) override
QSGRenderContext * createRenderContext(QSGContext *) const override
void update(QQuickWindow *window) override
void hide(QQuickWindow *window) override
QAnimationDriver * animationDriver() const override
void releaseResources(QQuickWindow *) override
void windowDestroyed(QQuickWindow *window) override
QSurface::SurfaceType windowSurfaceType() const override
void renderWindow(QQuickWindow *window)
QSGContext * sceneGraphContext() const override
virtual void initialize(const InitParams *params)
virtual void invalidate()
SurfaceType
The SurfaceType enum describes what type of surface this is.
\inmodule QtCore \reentrant
static QTime currentTime()
Returns the current time as reported by the system clock.
int msecsTo(QTime t) const
Returns the number of milliseconds from this time to t.
Combined button and popup list for selecting options.
#define qCDebug(category,...)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define Q_QUICK_SG_PROFILE_END(Type, position)
#define Q_QUICK_SG_PROFILE_SWITCH(Type1, Type2, position)
#define Q_QUICK_SG_PROFILE_RECORD(Type, position)
#define Q_QUICK_SG_PROFILE_START(Type)
#define Q_TRACE_SCOPE(x,...)