1 diff -rup slideshow.orig/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
2 --- slideshow.orig/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx 2008-09-09 17:03:49.000000000 +0200
3 +++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx 2008-09-09 17:37:31.000000000 +0200
4 @@ -84,9 +84,10 @@ using namespace ::boost::posix_time;
16 using namespace ::com::sun::star;
17 @@ -286,6 +287,14 @@ public:
18 bool mbTextureFromPixmap;
20 bool mbGenerateMipmap;
26 + time_duration total_update;
31 // declare the static variables as some gcc versions have problems declaring them automaticaly
32 @@ -1048,15 +1057,19 @@ void OGLTransitionerImpl::GLInitSlides()
34 void SAL_CALL OGLTransitionerImpl::update( double nTime ) throw (uno::RuntimeException)
38 + t3 = microsec_clock::local_time();
39 + if( frame_count == 1 ) {
41 + total_update = seconds (0);
44 osl::MutexGuard const guard( m_aMutex );
46 if (isDisposed() || !cbGLXPresent || pTransition->mnRequiredGLVersion > cnGLVersion)
50 - t3 = microsec_clock::local_time();
54 wglMakeCurrent(GLWin.hDC,GLWin.hRC);
56 @@ -1092,6 +1105,7 @@ void SAL_CALL OGLTransitionerImpl::updat
58 OSL_TRACE("update time: %f", nTime);
59 OSL_TRACE("update took: %s", to_simple_string( t4 - t3 ).c_str());
60 + total_update += (t4 - t3);
64 @@ -1100,7 +1114,19 @@ void OGLTransitionerImpl::disposing()
66 osl::MutexGuard const guard( m_aMutex );
69 OSL_TRACE("dispose %p\n", this);
71 + t6 = microsec_clock::local_time();
72 + time_duration duration = t6 - t5;
73 + OSL_TRACE("whole transition (frames: %d) took: %s fps: %f time spent in updates: %s percentage of transition time: %f%%",
74 + frame_count, to_simple_string( duration ).c_str(),
75 + ((double)frame_count*1000000000.0)/duration.total_nanoseconds(),
76 + to_simple_string( total_update ).c_str(),
77 + 100*(((double)total_update.total_nanoseconds())/((double)duration.total_nanoseconds()))
83 wglMakeCurrent(GLWin.hDC,GLWin.hRC);
84 @@ -1193,6 +1219,8 @@ OGLTransitionerImpl::OGLTransitionerImpl
89 + DBG(frame_count = 0);
92 typedef cppu::WeakComponentImplHelper1<presentation::XTransitionFactory> OGLTransitionFactoryImplBase;