8#include <QtCore/QCoreApplication>
10#include <private/qquickwindow_p.h>
11#include <private/qquickitem_p.h>
12#include <QElapsedTimer>
13#include <private/qquickanimatorcontroller_p.h>
14#include <private/qquickprofiler_p.h>
15#include <private/qsgsoftwarerenderer_p.h>
16#include <qpa/qplatformbackingstore.h>
18#include <QtGui/QBackingStore>
20#include <qtquick_tracepoints_p.h>
39 data.updatePending =
false;
40 data.grabOnly =
false;
64 d->cleanupNodesOnShutdown();
70 d->animationController.reset();
94 bool alsoSwap =
data.updatePending;
95 data.updatePending =
false;
106 qint64 renderTime = 0, syncTime = 0, polishTime = 0;
107 bool profileFrames = QSG_RASTER_LOG_TIME_RENDERLOOP().isDebugEnabled();
111 Q_TRACE(QSG_polishItems_entry);
119 QQuickProfiler::SceneGraphRenderLoopFrame,
120 QQuickProfiler::SceneGraphPolishPolish);
134 QQuickProfiler::SceneGraphRenderLoopSync);
139 if (softwareRenderer)
148 QQuickProfiler::SceneGraphRenderLoopRender);
153 data.grabOnly =
false;
156 if (alsoSwap &&
window->isVisible()) {
172 QQuickProfiler::SceneGraphRenderLoopSwap);
174 if (QSG_RASTER_LOG_TIME_RENDERLOOP().isDebugEnabled()) {
176 qCDebug(QSG_RASTER_LOG_TIME_RENDERLOOP,
177 "Frame rendered with 'software' renderloop in %dms, polish=%d, sync=%d, render=%d, swap=%d, frameDelta=%d",
178 int(swapTime / 1000000),
179 int(polishTime / 1000000),
180 int((syncTime - polishTime) / 1000000),
181 int((renderTime - syncTime) / 1000000),
182 int((swapTime - renderTime) / 1000000),
188 if (
data.updatePending)
194 if (
window->isExposed()) {
212 data.updatePending =
false;
257#include "moc_qsgsoftwarerenderloop_p.cpp"
The QBackingStore class provides a drawing area for QWindow.
void start() noexcept
Starts this timer.
qint64 nsecsElapsed() const noexcept
bool remove(const Key &key)
Removes the item that has the key from the hash.
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
\inmodule QtCore\reentrant
void flushFrameSynchronousEvents(QQuickWindow *win)
static QQuickWindowPrivate * get(QQuickWindow *c)
QSGRenderContext * context
QQuickDeliveryAgentPrivate * deliveryAgentPrivate() const
bool isRenderable() const
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
The QRegion class specifies a clip region for a painter.
The QSGContext holds the scene graph entry points for one QML engine.
virtual QSGRenderContext * createRenderContext()=0
virtual void invalidate()
void initializeIfNeeded()
QHash< QQuickWindow *, QBackingStore * > m_backingStores
QImage grab(QQuickWindow *window) override
void exposureChanged(QQuickWindow *window) override
QHash< QQuickWindow *, WindowData > m_windows
void maybeUpdate(QQuickWindow *window) override
QSGContext * sceneGraphContext() const override
void show(QQuickWindow *window) override
void hide(QQuickWindow *window) override
void handleUpdateRequest(QQuickWindow *) override
void windowDestroyed(QQuickWindow *window) override
QSurface::SurfaceType windowSurfaceType() const override
void renderWindow(QQuickWindow *window, bool isNewExpose=false)
void setBackingStore(QBackingStore *backingStore)
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,...)
GLenum GLuint GLintptr GLsizeiptr size
[1]
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,...)