2011-03-14 Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Command-line options for QGLWidget and WebGL to QtTestBrowser
        https://bugs.webkit.org/show_bug.cgi?id=56006

        * QtTestBrowser/launcherwindow.cpp:
        (LauncherWindow::initializeView):
        * QtTestBrowser/main.cpp:
        (LauncherApplication::handleUserOptions):

git-svn-id: svn://svn.chromium.org/blink/trunk@81108 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 70f64dbe
2011-03-14 Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Command-line options for QGLWidget and WebGL to QtTestBrowser
https://bugs.webkit.org/show_bug.cgi?id=56006
* QtTestBrowser/launcherwindow.cpp:
(LauncherWindow::initializeView):
* QtTestBrowser/main.cpp:
(LauncherApplication::handleUserOptions):
2011-03-14 James Kozianski <koz@chromium.org> 2011-03-14 James Kozianski <koz@chromium.org>
Reviewed by Ojan Vafai. Reviewed by Ojan Vafai.
......
...@@ -108,6 +108,10 @@ void LauncherWindow::initializeView() ...@@ -108,6 +108,10 @@ void LauncherWindow::initializeView()
m_view = view; m_view = view;
} else { } else {
WebViewGraphicsBased* view = new WebViewGraphicsBased(splitter); WebViewGraphicsBased* view = new WebViewGraphicsBased(splitter);
m_view = view;
#if defined(QT_CONFIGURED_WITH_OPENGL)
toggleQGLWidgetViewport(m_windowOptions.useQGLWidgetViewport);
#endif
view->setPage(page()); view->setPage(page());
connect(view, SIGNAL(currentFPSUpdated(int)), this, SLOT(updateFPS(int))); connect(view, SIGNAL(currentFPSUpdated(int)), this, SLOT(updateFPS(int)));
...@@ -116,8 +120,6 @@ void LauncherWindow::initializeView() ...@@ -116,8 +120,6 @@ void LauncherWindow::initializeView()
// The implementation of QAbstractScrollArea::eventFilter makes us need // The implementation of QAbstractScrollArea::eventFilter makes us need
// to install the event filter also on the viewport of a QGraphicsView. // to install the event filter also on the viewport of a QGraphicsView.
view->viewport()->installEventFilter(this); view->viewport()->installEventFilter(this);
m_view = view;
} }
m_touchMocking = false; m_touchMocking = false;
......
...@@ -177,6 +177,10 @@ void LauncherApplication::handleUserOptions() ...@@ -177,6 +177,10 @@ void LauncherApplication::handleUserOptions()
qDebug() << "Usage:" << programName.toLatin1().data() qDebug() << "Usage:" << programName.toLatin1().data()
<< "[-graphicsbased]" << "[-graphicsbased]"
<< "[-no-compositing]" << "[-no-compositing]"
#if defined(QT_CONFIGURED_WITH_OPENGL)
<< "[-gl-viewport]"
<< "[-webgl]"
#endif
<< QString("[-viewport-update-mode %1]").arg(formatKeys(updateModes)).toLatin1().data() << QString("[-viewport-update-mode %1]").arg(formatKeys(updateModes)).toLatin1().data()
<< "[-cache-webview]" << "[-cache-webview]"
<< "[-show-fps]" << "[-show-fps]"
...@@ -263,6 +267,11 @@ void LauncherApplication::handleUserOptions() ...@@ -263,6 +267,11 @@ void LauncherApplication::handleUserOptions()
requiresGraphicsView("-gl-viewport"); requiresGraphicsView("-gl-viewport");
windowOptions.useQGLWidgetViewport = true; windowOptions.useQGLWidgetViewport = true;
} }
if (args.contains("-webgl")) {
requiresGraphicsView("-webgl");
windowOptions.useWebGL = true;
}
#endif #endif
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment