Bug 34450

Summary: [Qt] Enable a way to measure FPS in QGVLauncher
Product: WebKit Reporter: Noam Rosenthal <noam>
Component: WebKit QtAssignee: 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 Flags
Add a command line argument to enable crude FPS measurements in QGVLauncher
ariya.hidayat: review-
FPS counter: changed name to --show-fps, guard from div-by-0
none
FPS counter: changed name to --show-fps, guard from div-by-0 none

Noam Rosenthal
Reported 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
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-
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
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
Noam Rosenthal
Comment 1 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.
Ariya Hidayat
Comment 2 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.
Noam Rosenthal
Comment 3 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.
Noam Rosenthal
Comment 4 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
Ariya Hidayat
Comment 5 2010-02-01 20:07:27 PST
LGTM! Good job :)
WebKit Commit Bot
Comment 6 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>
WebKit Commit Bot
Comment 7 2010-02-02 03:38:33 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.