aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-06-30 14:01:38 +0200
committerUlf Hermann <ulf.hermann@digia.com>2014-07-02 10:41:14 +0200
commit5f24d63d89009a91035f586a1d80fa61fcd2d681 (patch)
tree660dd93e612bf640885d97ad99783dc6c5a06926 /src/quick/util
parent708f5bdb2fb8aff65774d5c23933636f549bc316 (diff)
Properly collect polish timings from all render loops
Previously the polish timings were collected incorrectly from the windows render loop and not at all from the basic render loop. By collecting the polish times at the right places we can get rid of the 2-argument profile macro as well. Task-number: QTBUG-39876 Change-Id: I0b4aaf87162c652b8dcea6cd4f54db053f8312fe Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/quick/util')
-rw-r--r--src/quick/util/qquickprofiler.cpp4
-rw-r--r--src/quick/util/qquickprofiler_p.h10
2 files changed, 6 insertions, 8 deletions
diff --git a/src/quick/util/qquickprofiler.cpp b/src/quick/util/qquickprofiler.cpp
index 3e2a078fb9..3fd9b15f08 100644
--- a/src/quick/util/qquickprofiler.cpp
+++ b/src/quick/util/qquickprofiler.cpp
@@ -103,8 +103,8 @@ void QQuickProfilerData::toByteArrays(QList<QByteArray> &messages) const
case QQuickProfiler::SceneGraphWindowsRenderShow: ds << subtime_1 << subtime_2 << subtime_3; break;
// WindowsAnimations: update time
case QQuickProfiler::SceneGraphWindowsAnimations: ds << subtime_1; break;
- // WindowsRenderWindow: polish time; always comes packed after a RenderLoop
- case QQuickProfiler::SceneGraphWindowsPolishFrame: ds << subtime_4; break;
+ // non-threaded rendering: polish time
+ case QQuickProfiler::SceneGraphPolishFrame: ds << subtime_1; break;
default:break;
}
break;
diff --git a/src/quick/util/qquickprofiler_p.h b/src/quick/util/qquickprofiler_p.h
index 03cef951b5..d5927a1f1f 100644
--- a/src/quick/util/qquickprofiler_p.h
+++ b/src/quick/util/qquickprofiler_p.h
@@ -71,10 +71,8 @@ QT_BEGIN_NAMESPACE
#define Q_QUICK_PROFILE(Method)\
Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::Method)
-#define Q_QUICK_SG_PROFILE2(Type1, Type2, Params)\
- Q_QUICK_PROFILE_IF_ENABLED((QQuickProfiler::sceneGraphFrame<Type1, Type2> Params))
-
-#define Q_QUICK_SG_PROFILE1(Type, Params) Q_QUICK_SG_PROFILE2(Type, Type, Params)
+#define Q_QUICK_SG_PROFILE(Type, Params)\
+ Q_QUICK_PROFILE_IF_ENABLED((QQuickProfiler::sceneGraphFrame<Type> Params))
// This struct is somewhat dangerous to use:
@@ -170,12 +168,12 @@ public:
}
}
- template<SceneGraphFrameType FrameType1, SceneGraphFrameType FrameType2>
+ template<SceneGraphFrameType FrameType>
static void sceneGraphFrame(qint64 value1, qint64 value2 = -1, qint64 value3 = -1,
qint64 value4 = -1, qint64 value5 = -1)
{
s_instance->processMessage(QQuickProfilerData(s_instance->timestamp(), 1 << SceneGraphFrame,
- 1 << FrameType1 | 1 << FrameType2, value1, value2, value3, value4, value5));
+ 1 << FrameType, value1, value2, value3, value4, value5));
}
template<PixmapEventType PixmapState>