From 4758ed2cf25389ca4fca1788eaca8496633470b6 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Fri, 21 Jan 2011 17:38:14 +0000 Subject: [PATCH] journal: start uprof flush timer after flushing fb deps This avoids us recursively starting the _cogl_journal_flush uprof timer by only starting it after flushing the journals of dependency framebuffers. --- cogl/cogl-journal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cogl/cogl-journal.c b/cogl/cogl-journal.c index de2315cf3..e6c0c4d2e 100644 --- a/cogl/cogl-journal.c +++ b/cogl/cogl-journal.c @@ -1292,14 +1292,16 @@ _cogl_journal_flush (CoglJournal *journal, if (journal->entries->len == 0) return; - COGL_TIMER_START (_cogl_uprof_context, flush_timer); - /* The entries in this journal may depend on images in other * framebuffers which may require that we flush the journals * associated with those framebuffers before we can flush * this journal... */ _cogl_framebuffer_flush_dependency_journals (framebuffer); + /* Note: we start the timer after flushing dependency journals so + * that the timer isn't started recursively. */ + COGL_TIMER_START (_cogl_uprof_context, flush_timer); + cogl_push_framebuffer (framebuffer); if (G_UNLIKELY (cogl_debug_flags & COGL_DEBUG_BATCHING))