summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2014-03-13 21:26:44 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2014-03-13 21:26:44 (GMT)
commit283275e7611ed2523fe8e3d4ed44816bff63d2b5 (patch)
tree3185343b21de8aa6bcd7b9654368c0d393f0a803
parent5521a11686dfb36d7672dd97e7d73aaef732de41 (diff)
Revert "Add an fps counter for debugging."
This was just for debugging, no need to have it in master.
-rw-r--r--src/widgets/videoglwidget.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/widgets/videoglwidget.cpp b/src/widgets/videoglwidget.cpp
index 83aae63..3c62742 100644
--- a/src/widgets/videoglwidget.cpp
+++ b/src/widgets/videoglwidget.cpp
@@ -196,33 +196,6 @@ void VideoGLWidget::showImage(const QImage &image)
void VideoGLWidget::showImage(Mlt::Frame* frame, GLuint texnum)
{
- static bool first = true;
- static timespec start, now;
- static int frameno = 0;
-
- if (first) {
- clock_gettime(CLOCK_MONOTONIC, &start);
- first = false;
- }
-
- ++frameno;
-
- clock_gettime(CLOCK_MONOTONIC, &now);
- double elapsed = now.tv_sec - start.tv_sec +
- 1e-9 * (now.tv_nsec - start.tv_nsec);
- printf("%d frames in %.3f seconds = %.1f fps (%.1f ms/frame)\n",
- frameno, elapsed, frameno / elapsed,
- 1e3 * elapsed / frameno);
-
- // Reset every 100 frames, so that local variations in frame times
- // (especially for the first few frames, when the shaders are
- // compiled etc.) don't make it hard to measure for the entire
- // remaining duration of the program.
- if (frameno == 100) {
- frameno = 0;
- start = now;
- }
-
makeCurrent();
GLsync sync = (GLsync) frame->get("movit.convert.fence");
glClientWaitSync(sync, 0, GL_TIMEOUT_IGNORED);