Bug 34450 - [Qt] Enable a way to measure FPS in QGVLauncher
Summary: [Qt] Enable a way to measure FPS in QGVLauncher
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Noam Rosenthal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-01 14:33 PST by Noam Rosenthal
Modified: 2010-02-02 03:38 PST (History)
2 users (show)

See Also:


Attachments
Add a command line argument to enable crude FPS measurements in QGVLauncher (3.21 KB, patch)
2010-02-01 14:40 PST, Noam Rosenthal
ariya.hidayat: review-
Details | Formatted Diff | Diff
FPS counter: changed name to --show-fps, guard from div-by-0 (3.25 KB, patch)
2010-02-01 16:57 PST, Noam Rosenthal
no flags Details | Formatted Diff | Diff
FPS counter: changed name to --show-fps, guard from div-by-0 (3.25 KB, patch)
2010-02-01 16:58 PST, Noam Rosenthal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noam Rosenthal 2010-02-01 14:33:47 PST
This is needed in order to measure improvements to CSS accelerated compositing and general improvements to QtWebkit graphics
Comment 1 Noam Rosenthal 2010-02-01 14:40:13 PST
Created attachment 47871 [details]
Add a command line argument to enable crude FPS measurements in QGVLauncher

This is required for measuring improvements in QtWebkit graphics and in CSS accelerated-compositing.
Comment 2 Ariya Hidayat 2010-02-01 16:15:39 PST
Comment on attachment 47871 [details]
Add a command line argument to enable crude FPS measurements in QGVLauncher

> +        , 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.
Comment 3 Noam Rosenthal 2010-02-01 16:57:47 PST
Created attachment 47881 [details]
FPS counter: changed name to --show-fps, guard from div-by-0

ok - this should do it.
Comment 4 Noam Rosenthal 2010-02-01 16:58:58 PST
Created attachment 47882 [details]
FPS counter: changed name to --show-fps, guard from div-by-0

oops, re-uploading
Comment 5 Ariya Hidayat 2010-02-01 20:07:27 PST
LGTM! Good job :)
Comment 6 WebKit Commit Bot 2010-02-02 03:38:27 PST
Comment on attachment 47882 [details]
FPS counter: changed name to --show-fps, guard from div-by-0

Clearing flags on attachment: 47882

Committed r54222: <http://trac.webkit.org/changeset/54222>
Comment 7 WebKit Commit Bot 2010-02-02 03:38:33 PST
All reviewed patches have been landed.  Closing bug.