Summary: | [Qt] Enable a way to measure FPS in QGVLauncher | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Noam Rosenthal <noam> | ||||||||
Component: | WebKit Qt | Assignee: | Noam Rosenthal <noam> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | ariya.hidayat, commit-queue | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Noam Rosenthal
2010-02-01 14:33:47 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 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. Created attachment 47881 [details]
FPS counter: changed name to --show-fps, guard from div-by-0
ok - this should do it.
Created attachment 47882 [details]
FPS counter: changed name to --show-fps, guard from div-by-0
oops, re-uploading
LGTM! Good job :) 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> All reviewed patches have been landed. Closing bug. |