4#include <QtQuick/private/qsgcontext_p.h>
5#include <QtQuick/private/qsgtexture_p.h>
6#include <QtQuick/private/qsgrenderer_p.h>
7#include <QtQuick/private/qquickpixmapcache_p.h>
8#include <QtQuick/private/qsgadaptationlayer_p.h>
10#include <QGuiApplication>
12#include <QQuickWindow>
14#include <private/qqmlglobal_p.h>
16#include <QtQuick/private/qsgtexture_p.h>
17#include <QtGui/private/qguiapplication_p.h>
18#include <QtCore/private/qabstractanimation_p.h>
20#include <private/qobject_p.h>
76 qCDebug(QSG_LOG_INFO,
"Using %s",
bool(use) ?
"fixed animation steps" :
"sg animation driver");
94 m_vsync = 1000.0f / float(refreshRate);
136 qCDebug(QSG_LOG_INFO,
"Animation Driver: using vsync: %.2f ms",
m_vsync);
138 qCDebug(QSG_LOG_INFO,
"Animation Driver: using walltime");
186 qCDebug(QSG_LOG_INFO,
"animation driver switched to timer mode");
209 qCDebug(QSG_LOG_INFO,
"animation driver switched to vsync mode");
261 qCDebug(QSG_LOG_INFO,
"Animation Driver: using QElapsedTimer, thread %p %s",
357 if (useElapsedTimerBasedAnimationDriver())
402 qWarning(
"QSGRendererInterface not implemented");
436 void *callbackUserData)
438 renderer->setRenderTarget(renderTarget);
543#include "qsgcontext.moc"
544#include "moc_qsgcontext_p.cpp"
void advanceAnimation()
Advances the animation.
The QColor class provides colors based on RGB, HSV or CMYK values.
qint64 elapsed() const noexcept
Returns the number of milliseconds since this QElapsedTimer was last started.
qint64 restart() noexcept
Restarts the timer and returns the number of milliseconds elapsed since the previous start.
void start() noexcept
Starts this timer.
QScreen * primaryScreen
the primary (or default) screen of the application.
T take(const Key &key)
Removes the item with the key from the hash and returns the value associated with it.
T value(const Key &key) const noexcept
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
void unlock() noexcept
Unlocks the mutex.
void lock() noexcept
Locks the mutex.
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
QQuickGraphicsConfiguration controls lower level graphics settings for the QQuickWindow.
The QQuickTextureFactory class provides an interface for loading custom textures from QML....
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
The QRawFont class provides access to a single physical instance of a font.
\inmodule QtCore\reentrant
QSGAnimationDriver(QObject *parent)
float vsyncInterval() const
virtual bool isVSyncDependent() const =0
The QSGContext holds the scene graph entry points for one QML engine.
virtual void renderContextInitialized(QSGRenderContext *renderContext)
virtual float vsyncIntervalForAnimationDriver(QAnimationDriver *driver)
virtual QSGShaderEffectNode * createShaderEffectNode(QSGRenderContext *renderContext)
Creates a new shader effect node.
virtual bool isVSyncDependent(QAnimationDriver *driver)
virtual QSGRendererInterface * rendererInterface(QSGRenderContext *renderContext)
Returns a pointer to the (presumably) global renderer interface.
virtual QSGInternalRectangleNode * createInternalRectangleNode()=0
virtual QAnimationDriver * createAnimationDriver(QObject *parent)
Creates a new animation driver.
QSGContext(QObject *parent=nullptr)
virtual QSGGuiThreadShaderEffectManager * createGuiThreadShaderEffectManager()
Creates a new shader effect helper instance.
virtual QSize minimumFBOSize() const
virtual void renderContextInvalidated(QSGRenderContext *renderContext)
qint64 elapsed() const override
Returns the number of milliseconds since the animations was started.
void advance() override
Advances the animation.
QSGDefaultAnimationDriver(QObject *parent)
bool isVSyncDependent() const override
QSGElapsedTimerAnimationDriver(QObject *parent)
bool isVSyncDependent() const override
qint64 elapsed() const override
Returns the number of milliseconds since the animations was started.
void advance() override
Advances the animation.
virtual void setRect(const QRectF &rect)=0
virtual void setColor(const QColor &color)=0
void registerFontengineForCleanup(QFontEngine *engine)
QSGRenderContext(QSGContext *context)
QHash< QObject *, QSGTexture * > m_textures
virtual void endNextFrame(QSGRenderer *renderer)
QHash< QFontEngine *, int > m_fontEnginesToClean
virtual void initialize(const InitParams *params)
virtual void beginNextFrame(QSGRenderer *renderer, const QSGRenderTarget &renderTarget, RenderPassCallback mainPassRecordingStart, RenderPassCallback mainPassRecordingEnd, void *callbackUserData)
void textureFactoryDestroyed(QObject *o)
virtual void invalidateGlyphCaches()
virtual QSGDistanceFieldGlyphCache * distanceFieldGlyphCache(const QRawFont &font, int renderTypeQuality)
Factory function for scene graph backends of the distance-field glyph cache.
virtual void invalidate()
void(*)(void *) RenderPassCallback
virtual void preprocess()
Do necessary preprocessing before the frame.
virtual QRhi * rhi() const
void unregisterFontengineForCleanup(QFontEngine *engine)
virtual void prepareSync(qreal devicePixelRatio, QRhiCommandBuffer *cb, const QQuickGraphicsConfiguration &config)
QSGTexture * textureForFactory(QQuickTextureFactory *factory, QQuickWindow *window)
Factory function for the scene graph renderers.
~QSGRenderContext() override
virtual QSGTexture * compressedTextureForFactory(const QSGCompressedTextureFactory *) const
Return the texture corresponding to a texture factory.
QSet< QSGTexture * > m_texturesToDelete
An interface providing access to some of the graphics API specific internals of the scenegraph.
The renderer class is the abstract baseclass used for rendering the QML scene graph.
The QScreen class is used to query screen properties. \inmodule QtGui.
qreal refreshRate
the approximate vertical refresh rate of the screen in Hz
static QThread * currentThread()
static QUnifiedTimer * instance()
void setConsistentTiming(bool consistent)
qDeleteAll(list.begin(), list.end())
Combined button and popup list for selecting options.
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
#define DEFINE_BOOL_CONFIG_OPTION(name, var)
bool qsg_useConsistentTiming()
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
Q_CORE_EXPORT bool qEnvironmentVariableIsEmpty(const char *varName) noexcept
QItemEditorFactory * factory
QSvgRenderer * renderer
[0]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent