[pinpoint] Skip the frames until the previous frame is rendered



commit a1990fc0bfc722c194d5b8dfc59ca114e0c10561
Author: Gary Ching-Pang Lin <chingpang gmail com>
Date:   Fri Dec 30 18:04:37 2011 +0800

    Skip the frames until the previous frame is rendered
    
    Rendering the thumbnail of the video file may takes longer than
    15 milliseconds, and pinpoint would crash when there are more than
    2 threads to render the frames.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=665756
    
    Signed-off-by: Antonio Terceiro <terceiro softwarelivre org>

 pp-clutter.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/pp-clutter.c b/pp-clutter.c
index 87ae81d..9900de2 100644
--- a/pp-clutter.c
+++ b/pp-clutter.c
@@ -1735,11 +1735,18 @@ static gboolean update_speaker_screen (ClutterRenderer *renderer)
     return FALSE;
 
   point = pp_slidep->data;
+  static gboolean is_updated = TRUE;
   static float current_slide_time = 0.0;
   static float current_slide_duration = 0.0;
   static GList *current_slide = NULL;
   float nh, nw;
 
+  /* Skip this update since the previous one isn't finished */
+  if (!is_updated)
+    return TRUE;
+
+  is_updated = FALSE;
+
   if (renderer->reset)
     {
       current_slide = NULL;
@@ -1805,7 +1812,7 @@ static gboolean update_speaker_screen (ClutterRenderer *renderer)
     }
 
   if (!renderer->speaker_mode)
-    return TRUE;
+    goto out;
 
   if (point->speaker_notes)
     clutter_text_set_text (CLUTTER_TEXT (renderer->speaker_notes),
@@ -1971,6 +1978,10 @@ static gboolean update_speaker_screen (ClutterRenderer *renderer)
                               nh * 0.35);
   clutter_actor_set_width    (renderer->speaker_notes,
                               nw * 0.5);
+
+out:
+  is_updated = TRUE;
+
   return TRUE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]