[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10690: Fix fps debugging to actuall
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10690: Fix fps debugging to actually return rate of SWF advancement, not heart-beating one. It helps evaluating/profiling effects of heart-beating rates on SWF playback. For example, try using -d to set a delay which matches SWF nominal frame rate and actual rendering FPS improves (reducing no-op heartbeats). |
Date: |
Thu, 12 Mar 2009 11:14:31 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10690
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Thu 2009-03-12 11:14:31 +0100
message:
Fix fps debugging to actually return rate of SWF advancement, not
heart-beating one. It helps evaluating/profiling effects of heart-beating rates
on SWF playback. For example, try using -d to set a delay which matches SWF
nominal frame rate and actual rendering FPS improves (reducing no-op
heartbeats).
modified:
gui/gui.cpp
libcore/movie_root.cpp
libcore/movie_root.h
=== modified file 'gui/gui.cpp'
--- a/gui/gui.cpp 2009-03-02 12:12:43 +0000
+++ b/gui/gui.cpp 2009-03-12 10:14:31 +0000
@@ -905,27 +905,34 @@
gnash::movie_root* m = _stage;
-#ifdef GNASH_FPS_DEBUG
- fpsCounterTick(); // will be a no-op if fps_timer_interval is zero
-#endif
-
// Define REVIEW_ALL_FRAMES to have *all* frames
// consequencially displaied. Useful for debugging.
//#define REVIEW_ALL_FRAMES 1
#ifndef REVIEW_ALL_FRAMES
// Advance movie by one frame
- m->advance();
+#ifdef GNASH_FPS_DEBUG
+ bool advanced =
+#endif
+ m->advance();
#else
size_t cur_frame = m->getRootMovie()->get_current_frame();
size_t tot_frames = m->getRootMovie()->get_frame_count();
- m->advance();
+#ifdef GNASH_FPS_DEBUG
+ bool advanced =
+#endif
+ m->advance();
m->get_movie_definition()->ensure_frame_loaded(tot_frames);
m->goto_frame(cur_frame+1);
m->set_play_state(gnash::MovieClip::PLAY);
log_debug(_("Frame %d"), m->get_current_frame());
#endif
+#ifdef GNASH_FPS_DEBUG
+ if ( advanced ) fpsCounterTick(); // will be a no-op if
fps_timer_interval is zero
+#endif
+
+
#ifdef SKIP_RENDERING_IF_LATE
=== modified file 'libcore/movie_root.cpp'
--- a/libcore/movie_root.cpp 2009-03-02 12:12:43 +0000
+++ b/libcore/movie_root.cpp 2009-03-12 10:14:31 +0000
@@ -1042,15 +1042,18 @@
}
-void
+bool
movie_root::advance()
{
unsigned int now = _vm.getTime();
+ bool advanced = false;
+
try {
if ( (now - _lastMovieAdvancement) >= _movieAdvancementDelay )
{
+ advanced = true;
advanceMovie();
// setting to 'now' discards time spent on actual rendering
and
// action processing.
@@ -1080,6 +1083,8 @@
log_error(_("Buffer overread during advance: %s"), e.what());
clearActionQueue();
}
+
+ return advanced;
}
void
=== modified file 'libcore/movie_root.h'
--- a/libcore/movie_root.h 2009-03-02 12:12:43 +0000
+++ b/libcore/movie_root.h 2009-03-12 10:14:31 +0000
@@ -358,7 +358,11 @@
/// Main and only callback from hosting application.
/// Expected to be called at 10ms resolution.
- void advance();
+ //
+ /// @return true if the heart-beat resulted in actual
+ /// SWF playhead advancement (frame advancement)
+ ///
+ bool advance();
/// Entry point for movie advancement
//
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10690: Fix fps debugging to actually return rate of SWF advancement, not heart-beating one. It helps evaluating/profiling effects of heart-beating rates on SWF playback. For example, try using -d to set a delay which matches SWF nominal frame rate and actual rendering FPS improves (reducing no-op heartbeats).,
Sandro Santilli <=