Commit aa5e963a authored by eric@webkit.org's avatar eric@webkit.org

2010-02-03 No'am Rosenthal <noam.rosenthal@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt] Tuning and optimizations to GraphicsLayerQt. Reduce unnecessary
        recaching, remove QTimer::singleShot and QPixmap::scaled, more
        accurate strategy of handling transform operation blends. Rotating a
        bordered-table, for example, now runs at 50FPS instead of 40FPS on Maemo5.

        https://bugs.webkit.org/show_bug.cgi?id=34062

        This is tested by https://bugs.webkit.org/show_bug.cgi?id=34450, fps measurements.

        * platform/graphics/qt/GraphicsLayerQt.cpp:
        (WebCore::GraphicsLayerQtImpl::flushChanges): Fine-tune caching
        (WebCore::TransformAnimationQt::TransformAnimationQt): transform bugs
        (WebCore::OpacityAnimationQt::updateState): style change
2010-02-03  No'am Rosenthal  <noam.rosenthal@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt] Tuning and optimizations to GraphicsLayerQt. Mainly reduced usage
        of QTimer::singleShot, and moved syncLayers() from paint() to update()
        https://bugs.webkit.org/show_bug.cgi?id=34062

        * Api/qgraphicswebview.cpp:
        (QGraphicsWebViewPrivate::update): Moved the sync operation to update
        (QGraphicsWebView::paint): Moved the sync operation to update

git-svn-id: svn://svn.chromium.org/blink/trunk@54281 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2552b63b
2010-02-03 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Laszlo Gombos.
[Qt] Tuning and optimizations to GraphicsLayerQt. Reduce unnecessary
recaching, remove QTimer::singleShot and QPixmap::scaled, more
accurate strategy of handling transform operation blends. Rotating a
bordered-table, for example, now runs at 50FPS instead of 40FPS on Maemo5.
https://bugs.webkit.org/show_bug.cgi?id=34062
This is tested by https://bugs.webkit.org/show_bug.cgi?id=34450, fps measurements.
* platform/graphics/qt/GraphicsLayerQt.cpp:
(WebCore::GraphicsLayerQtImpl::flushChanges): Fine-tune caching
(WebCore::TransformAnimationQt::TransformAnimationQt): transform bugs
(WebCore::OpacityAnimationQt::updateState): style change
2010-02-02 Joel Stanley <joel@jms.id.au> 2010-02-02 Joel Stanley <joel@jms.id.au>
Reviewed by David Levin. Reviewed by David Levin.
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "qwebpage_p.h" #include "qwebpage_p.h"
#include "QWebPageClient.h" #include "QWebPageClient.h"
#include <FrameView.h> #include <FrameView.h>
#include <QtCore/qmetaobject.h>
#include <QtCore/qsharedpointer.h> #include <QtCore/qsharedpointer.h>
#include <QtCore/qtimer.h> #include <QtCore/qtimer.h>
#include <QtGui/qapplication.h> #include <QtGui/qapplication.h>
...@@ -78,13 +79,14 @@ public: ...@@ -78,13 +79,14 @@ public:
, page(0) , page(0)
#if USE(ACCELERATED_COMPOSITING) #if USE(ACCELERATED_COMPOSITING)
, rootGraphicsLayer(0) , rootGraphicsLayer(0)
, shouldSync(true) , shouldSync(false)
#endif #endif
{ {
#if USE(ACCELERATED_COMPOSITING) #if USE(ACCELERATED_COMPOSITING)
// the overlay and stays alive for the lifetime of // the overlay and stays alive for the lifetime of
// this QGraphicsWebView as the scrollbars are needed when there's no compositing // this QGraphicsWebView as the scrollbars are needed when there's no compositing
q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption); q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption);
syncMetaMethod = q->metaObject()->method(q->metaObject()->indexOfMethod("syncLayers()"));
#endif #endif
} }
...@@ -131,6 +133,9 @@ public: ...@@ -131,6 +133,9 @@ public:
// compositor telling us to do so. We'll get that call from ChromeClientQt // compositor telling us to do so. We'll get that call from ChromeClientQt
bool shouldSync; bool shouldSync;
// we have to flush quite often, so we use a meta-method instead of QTimer::singleShot for putting the event in the queue
QMetaMethod syncMetaMethod;
// we need to put the root graphics layer behind the overlay (which contains the scrollbar) // we need to put the root graphics layer behind the overlay (which contains the scrollbar)
enum { RootGraphicsLayerZValue, OverlayZValue }; enum { RootGraphicsLayerZValue, OverlayZValue };
#endif #endif
...@@ -178,7 +183,7 @@ void QGraphicsWebViewPrivate::markForSync(bool scheduleSync) ...@@ -178,7 +183,7 @@ void QGraphicsWebViewPrivate::markForSync(bool scheduleSync)
{ {
shouldSync = true; shouldSync = true;
if (scheduleSync) if (scheduleSync)
QTimer::singleShot(0, q, SLOT(syncLayers())); syncMetaMethod.invoke(q, Qt::QueuedConnection);
} }
void QGraphicsWebViewPrivate::updateCompositingScrollPosition() void QGraphicsWebViewPrivate::updateCompositingScrollPosition()
...@@ -224,6 +229,7 @@ void QGraphicsWebViewPrivate::update(const QRect & dirtyRect) ...@@ -224,6 +229,7 @@ void QGraphicsWebViewPrivate::update(const QRect & dirtyRect)
#if USE(ACCELERATED_COMPOSITING) #if USE(ACCELERATED_COMPOSITING)
if (overlay) if (overlay)
overlay->update(QRectF(dirtyRect)); overlay->update(QRectF(dirtyRect));
syncLayers();
#endif #endif
} }
...@@ -442,7 +448,6 @@ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem* ...@@ -442,7 +448,6 @@ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem*
{ {
#if USE(ACCELERATED_COMPOSITING) #if USE(ACCELERATED_COMPOSITING)
page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect()); page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect());
d->syncLayers();
#else #else
page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect()); page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect());
#endif #endif
......
2010-02-03 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Laszlo Gombos.
[Qt] Tuning and optimizations to GraphicsLayerQt. Mainly reduced usage
of QTimer::singleShot, and moved syncLayers() from paint() to update()
https://bugs.webkit.org/show_bug.cgi?id=34062
* Api/qgraphicswebview.cpp:
(QGraphicsWebViewPrivate::update): Moved the sync operation to update
(QGraphicsWebView::paint): Moved the sync operation to update
2010-02-02 Kenneth Rohde Christiansen <kenneth@webkit.org> 2010-02-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Ariya Hidayat. Reviewed by Ariya Hidayat.
......
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