[Webkit-unassigned] [Bug 34450] [Qt] Enable a way to measure FPS in QGVLauncher

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 1 16:15:39 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=34450


Ariya Hidayat <ariya.hidayat at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #47871|review?                     |review-
               Flag|                            |




--- Comment #2 from Ariya Hidayat <ariya.hidayat at gmail.com>  2010-02-01 16:15:39 PST ---
(From update of attachment 47871)
> +        , m_measureFps(QApplication::instance()->arguments().contains("--fps"))

Maybe --show-fps is a better name?

> +        QTime now = QTime::currentTime();
> +        int msecs = m_startTime.msecsTo(now);
> +        int totalMsecs = m_totalStartTime.msecsTo(now);
> +        int totalFps = m_numTotalPaints * 1000 / totalMsecs;
> +        int curFps = m_numPaintsSinceLastMeasure * 1000 / msecs;

Please guard against divide-by-zero (yes, that might happen accidently :)

r- for this minor issues. Otherwise, looks good.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list