Commit 1fb233f7 authored by eric@webkit.org's avatar eric@webkit.org

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

        Reviewed by Ariya Hidayat.

        [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-04  No'am Rosenthal  <noam.rosenthal@nokia.com>

        Reviewed by Ariya Hidayat.

        [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@54344 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent d17b787d
2010-02-04 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Ariya Hidayat.
[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-04 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
......
......@@ -27,6 +27,7 @@
#include "qwebpage_p.h"
#include "QWebPageClient.h"
#include <FrameView.h>
#include <QtCore/qmetaobject.h>
#include <QtCore/qsharedpointer.h>
#include <QtCore/qtimer.h>
#include <QtGui/qapplication.h>
......@@ -78,13 +79,14 @@ public:
, page(0)
#if USE(ACCELERATED_COMPOSITING)
, rootGraphicsLayer(0)
, shouldSync(true)
, shouldSync(false)
#endif
{
#if USE(ACCELERATED_COMPOSITING)
// the overlay and stays alive for the lifetime of
// this QGraphicsWebView as the scrollbars are needed when there's no compositing
q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption);
syncMetaMethod = q->metaObject()->method(q->metaObject()->indexOfMethod("syncLayers()"));
#endif
}
......@@ -131,6 +133,9 @@ public:
// compositor telling us to do so. We'll get that call from ChromeClientQt
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)
enum { RootGraphicsLayerZValue, OverlayZValue };
#endif
......@@ -178,7 +183,7 @@ void QGraphicsWebViewPrivate::markForSync(bool scheduleSync)
{
shouldSync = true;
if (scheduleSync)
QTimer::singleShot(0, q, SLOT(syncLayers()));
syncMetaMethod.invoke(q, Qt::QueuedConnection);
}
void QGraphicsWebViewPrivate::updateCompositingScrollPosition()
......@@ -224,6 +229,7 @@ void QGraphicsWebViewPrivate::update(const QRect & dirtyRect)
#if USE(ACCELERATED_COMPOSITING)
if (overlay)
overlay->update(QRectF(dirtyRect));
syncLayers();
#endif
}
......@@ -442,7 +448,6 @@ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem*
{
#if USE(ACCELERATED_COMPOSITING)
page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect());
d->syncLayers();
#else
page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect());
#endif
......
2010-02-04 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Ariya Hidayat.
[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-03 Andras Becsi <abecsi@webkit.org>
Unreviewed build fix.
......
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