summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/qmlvideo/performancemonitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/video/qmlvideo/performancemonitor.cpp')
-rw-r--r--examples/multimedia/video/qmlvideo/performancemonitor.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/multimedia/video/qmlvideo/performancemonitor.cpp b/examples/multimedia/video/qmlvideo/performancemonitor.cpp
new file mode 100644
index 000000000..26f0fae2a
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/performancemonitor.cpp
@@ -0,0 +1,31 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "performancemonitor.h"
+
+namespace PerformanceMonitor {
+
+bool State::parseArgument(const QByteArray &arg)
+{
+ bool result = false;
+ if (arg == "-log-perf") {
+ logging = true;
+ valid = true;
+ result = true;
+ } else if (arg == "-no-log-perf") {
+ logging = false;
+ valid = true;
+ result = true;
+ } else if (arg == "-show-perf") {
+ visible = true;
+ valid = true;
+ result = true;
+ } else if (arg == "-hide-perf") {
+ visible = false;
+ valid = true;
+ result = true;
+ }
+ return result;
+}
+
+} // namespace PerformanceMonitor