Changeset 56553 in webkit
- Timestamp:
- Mar 25, 2010 10:18:07 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r56547 r56553 1 2010-03-22 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 3 Reviewed by Simon Hausmann. 4 5 Not displaying FPS info on the terminal. On S60 and Maemo the 6 Window title will be used and Status bar will used on desktop. 7 8 [Qt] QtLauncher's FPS info should not be displayed on the terminal 9 https://bugs.webkit.org/show_bug.cgi?id=36244 10 11 * QtLauncher/main.cpp: 12 (LauncherWindow::initializeView): 13 (LauncherWindow::showFPS): 14 (LauncherWindow::updateFPS): 15 * QtLauncher/webview.cpp: 16 (WebViewGraphicsBased::setFrameRateMeasurementEnabled): 17 (WebViewGraphicsBased::updateFrameRate): 18 * QtLauncher/webview.h: 19 (WebViewGraphicsBased::frameRateMeasurementEnabled): 20 1 21 2010-03-25 Diego Gonzalez <diego.gonzalez@openbossa.org> 2 22 -
trunk/WebKitTools/QtLauncher/main.cpp
r56539 r56553 142 142 void newWindow(); 143 143 void cloneWindow(); 144 void updateFPS(int fps); 144 145 145 146 signals: … … 620 621 connect(m_flipYAnimated, SIGNAL(triggered()), view, SLOT(animatedYFlip())); 621 622 623 connect(view, SIGNAL(currentFPSUpdated(int)), this, SLOT(updateFPS(int))); 624 622 625 // The implementation of QAbstractScrollArea::eventFilter makes us need 623 626 // to install the event filter on the viewport of a QGraphicsView. … … 658 661 WebViewGraphicsBased* view = static_cast<WebViewGraphicsBased*>(m_view); 659 662 view->setFrameRateMeasurementEnabled(enable); 663 664 if (!enable) { 665 #ifdef Q_WS_MAEMO_5 && defined(Q_WS_S60) 666 setWindowTitle(""); 667 #else 668 statusBar()->clearMessage(); 669 #endif 670 } 660 671 } 661 672 … … 687 698 LauncherWindow* mw = new LauncherWindow(this, true); 688 699 mw->show(); 700 } 701 702 void LauncherWindow::updateFPS(int fps) 703 { 704 QString fpsStatusText = QString("Current FPS: %1").arg(fps); 705 706 #ifdef Q_WS_MAEMO_5 && defined(Q_WS_S60) 707 setWindowTitle(fpsStatusText); 708 #else 709 statusBar()->showMessage(fpsStatusText); 710 #endif 689 711 } 690 712 -
trunk/WebKitTools/QtLauncher/webview.cpp
r56335 r56553 108 108 m_lastConsultTime = m_startTime = QTime::currentTime(); 109 109 m_updateTimer->start(); 110 } else 110 } else 111 111 m_updateTimer->stop(); 112 112 } … … 122 122 int current = interval ? m_numPaintsSinceLastMeasure * 1000 / interval : 0; 123 123 124 qDebug("[FPS] average: %d, current: %d", average,current);124 emit currentFPSUpdated(current); 125 125 126 126 m_lastConsultTime = now; -
trunk/WebKitTools/QtLauncher/webview.h
r56335 r56553 77 77 78 78 void setFrameRateMeasurementEnabled(bool enabled); 79 bool frameRateMeasurementEnabled() { return m_measureFps; }79 bool frameRateMeasurementEnabled() const { return m_measureFps; } 80 80 81 81 virtual void paintEvent(QPaintEvent* event); 82 82 83 83 void setResizesToContents(bool b); 84 84 … … 98 98 return m_yRotation; 99 99 } 100 100 101 101 GraphicsWebView* graphicsWebView() const { return m_item; } 102 102 … … 108 108 signals: 109 109 void yFlipRequest(); 110 void currentFPSUpdated(int fps); 110 111 111 112 private:
Note: See TracChangeset
for help on using the changeset viewer.