Changeset 651 for trunk/tools/qttracereplay
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/tools/qttracereplay/main.cpp
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 20 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 53 53 54 54 void paintEvent(QPaintEvent *event); 55 55 56 56 57 public slots: … … 65 66 QTime timer; 66 67 68 67 69 QList<uint> iterationTimes; 68 70 QString filename; … … 71 73 void ReplayWidget::updateRect() 72 74 { 73 if (! updates.isEmpty())74 update(updates.at( currentFrame));75 if (!pdates.isEmpty()) 76 update(updates.at()); 75 77 } 76 78 … … 81 83 // p.setClipRegion(frames.at(currentFrame).updateRegion); 82 84 83 buffer.draw(&p, currentFrame);85 buffer.draw(&p, ); 84 86 85 87 ++currentFrame; 86 if (currentFrame >= buffer.numFrames()) {88 if (currentFrame >= ()) { 87 89 currentFrame = 0; 88 90 ++currentIteration; … … 120 122 if (iterationTimes.size() >= 10 || stddev < 4) { 121 123 printf("%s, iterations: %d, frames: %d, min(ms): %d, median(ms): %d, stddev: %f %%, max(fps): %f\n", qPrintable(filename), 122 iterationTimes.size(), updates.size(), min, median, stddev, 1000. * updates.size() / min);124 iterationTimes.size(), pdates.size() / min); 123 125 deleteLater(); 124 126 return; … … 131 133 } 132 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 133 150 ReplayWidget::ReplayWidget(const QString &filename_) 134 151 : currentFrame(0) … … 139 156 QFile file(filename); 140 157 141 QRect bounds;142 158 if (!file.open(QIODevice::ReadOnly)) { 143 159 printf("Failed to load input file '%s'\n", qPrintable(filename_));
Note:
See TracChangeset
for help on using the changeset viewer.