Changeset 56553 in webkit


Ignore:
Timestamp:
Mar 25, 2010 10:18:07 AM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

Not displaying FPS info on the terminal. On S60 and Maemo the Window title will be used and Status bar will used on desktop.

Reviewed by Simon Hausmann.
Patch by Jesus Palencia <jesus.palencia@openbossa.org>

[Qt] QtLauncher's FPS info should not be displayed on the terminal
https://bugs.webkit.org/show_bug.cgi?id=36244

  • QtLauncher/main.cpp:

(LauncherWindow::initializeView):
(LauncherWindow::showFPS):
(LauncherWindow::updateFPS):

  • QtLauncher/webview.cpp:

(WebViewGraphicsBased::setFrameRateMeasurementEnabled):
(WebViewGraphicsBased::updateFrameRate):

  • QtLauncher/webview.h:

(WebViewGraphicsBased::frameRateMeasurementEnabled):

Location:
trunk/WebKitTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r56547 r56553  
     12010-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
    1212010-03-25  Diego Gonzalez  <diego.gonzalez@openbossa.org>
    222
  • trunk/WebKitTools/QtLauncher/main.cpp

    r56539 r56553  
    142142    void newWindow();
    143143    void cloneWindow();
     144    void updateFPS(int fps);
    144145
    145146signals:
     
    620621            connect(m_flipYAnimated, SIGNAL(triggered()), view, SLOT(animatedYFlip()));
    621622
     623        connect(view, SIGNAL(currentFPSUpdated(int)), this, SLOT(updateFPS(int)));
     624
    622625        // The implementation of QAbstractScrollArea::eventFilter makes us need
    623626        // to install the event filter on the viewport of a QGraphicsView.
     
    658661    WebViewGraphicsBased* view = static_cast<WebViewGraphicsBased*>(m_view);
    659662    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    }
    660671}
    661672
     
    687698    LauncherWindow* mw = new LauncherWindow(this, true);
    688699    mw->show();
     700}
     701
     702void 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
    689711}
    690712
  • trunk/WebKitTools/QtLauncher/webview.cpp

    r56335 r56553  
    108108        m_lastConsultTime = m_startTime = QTime::currentTime();
    109109        m_updateTimer->start();
    110     } else 
     110    } else
    111111        m_updateTimer->stop();
    112112}
     
    122122    int current = interval ? m_numPaintsSinceLastMeasure * 1000 / interval : 0;
    123123
    124     qDebug("[FPS] average: %d, current: %d", average, current);
     124    emit currentFPSUpdated(current);
    125125
    126126    m_lastConsultTime = now;
  • trunk/WebKitTools/QtLauncher/webview.h

    r56335 r56553  
    7777
    7878    void setFrameRateMeasurementEnabled(bool enabled);
    79     bool frameRateMeasurementEnabled() { return m_measureFps; }
     79    bool frameRateMeasurementEnabled() const { return m_measureFps; }
    8080
    8181    virtual void paintEvent(QPaintEvent* event);
    82    
     82
    8383    void setResizesToContents(bool b);
    8484
     
    9898        return m_yRotation;
    9999    }
    100    
     100
    101101    GraphicsWebView* graphicsWebView() const { return m_item; }
    102102
     
    108108signals:
    109109    void yFlipRequest();
     110    void currentFPSUpdated(int fps);
    110111
    111112private:
Note: See TracChangeset for help on using the changeset viewer.