9#include <QGlobalStatic>
11#include <QElapsedTimer>
59 return m_d->isEnabled;
66 if (
m_d->fpsSum > 0) {
67 value = qreal(
m_d->fpsCounter) /
m_d->fpsSum * 1000.0;
85 if (!
m_d->isEnabled)
return;
87 m_d->fpsSum +=
m_d->time.restart();
90 if (
m_d->fpsCounter > 100 &&
m_d->fpsSum > 0) {
91 qDebug() <<
"Requested FPS:" << qreal(
m_d->fpsCounter) /
m_d->fpsSum * 1000.0;
99 if (!
m_d->isEnabled)
return;
101 m_d->syncFlaggedSum += isBusy;
102 m_d->syncFlaggedCounter++;
104 if (
m_d->syncFlaggedCounter > 500 &&
m_d->syncFlaggedSum > 0) {
105 qDebug() <<
"glSync effectiveness:" << qreal(
m_d->syncFlaggedSum) /
m_d->syncFlaggedCounter;
106 m_d->syncFlaggedSum = 0;
107 m_d->syncFlaggedCounter = 0;
float value(const T *src, size_t ch)
Q_GLOBAL_STATIC(KisStoragePluginRegistry, s_instance)
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
static KisConfigNotifier * instance()
bool enableOpenGLFramerateLogging(bool defaultValue=false) const
void notifyPaintRequested()
static KisOpenglCanvasDebugger * instance()
void notifySyncStatus(bool value)
bool showFpsOnCanvas() const
const QScopedPointer< Private > m_d
~KisOpenglCanvasDebugger()