2011-06-14 No'am Rosenthal <noam.rosenthal@nokia.com> and Viatcheslav Ostapenko...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jun 2011 14:07:55 +0000 (14:07 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jun 2011 14:07:55 +0000 (14:07 +0000)
commit5043ff621bed348c1ba3c22480d24a2273e7566e
treedfbf60a56c8d46582242bf82b19ba783e5b651c3
parentf3d70e62a7caf18181d8b4acd83de9db28b58241
2011-06-14  No'am Rosenthal  <noam.rosenthal@nokia.com> and Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Implement accelerated compositing on WK2 Qt port
        https://bugs.webkit.org/show_bug.cgi?id=56935

        Implementing LayerTreeHost and LayerTreeContext and LayerTreeHost for Qt.
        Add the necessary plumbing to make the LayerTreeHost work with Qt, based on the original Mac
        implementation (the code is nearly identical). This includes creating the right layers for the
        overlay and for the non-composited content, and passing the root layer to the UI process.

        Also, since LayerTreeHostQt is compiled, we have to add some of the rest of the existing patches,
        namely the new messages: syncCompositingLayers and updateCompositingLayerContent, and create a
        stub implementation for them in DrawingAreaProxy.

        Note that this is not activated yet, until we enable accelerated compositing in the settings and
        create the right GraphicsLayer.

        * Scripts/webkit2/messages.py:
        * Shared/LayerTreeContext.h:
        * Shared/qt/LayerTreeContextQt.cpp:
        (WebKit::LayerTreeContext::LayerTreeContext):
        (WebKit::LayerTreeContext::~LayerTreeContext):
        (WebKit::LayerTreeContext::encode):
        (WebKit::LayerTreeContext::decode):
        (WebKit::LayerTreeContext::isEmpty):
        (WebKit::operator==):
        * UIProcess/DrawingAreaProxy.h:
        (WebKit::DrawingAreaProxy::syncCompositingLayers):
        (WebKit::DrawingAreaProxy::updateCompositingLayerContent):
        * UIProcess/DrawingAreaProxy.messages.in:
        * WebKit2.pro:
        * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
        (WebCore::collectCompositingInfoForThisLayer):
        * WebProcess/WebPage/LayerTreeHost.cpp:
        (WebKit::LayerTreeHost::create):
        * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
        (WebKit::LayerTreeHostQt::create):
        (WebKit::LayerTreeHostQt::~LayerTreeHostQt):
        (WebKit::LayerTreeHostQt::LayerTreeHostQt):
        (WebKit::LayerTreeHostQt::setLayerFlushSchedulingEnabled):
        (WebKit::LayerTreeHostQt::scheduleLayerFlush):
        (WebKit::LayerTreeHostQt::cancelPendingLayerFlush):
        (WebKit::LayerTreeHostQt::setShouldNotifyAfterNextScheduledLayerFlush):
        (WebKit::LayerTreeHostQt::setRootCompositingLayer):
        (WebKit::LayerTreeHostQt::invalidate):
        (WebKit::LayerTreeHostQt::setNonCompositedContentsNeedDisplay):
        (WebKit::LayerTreeHostQt::scrollNonCompositedContents):
        (WebKit::LayerTreeHostQt::forceRepaint):
        (WebKit::LayerTreeHostQt::sizeDidChange):
        (WebKit::LayerTreeHostQt::didInstallPageOverlay):
        (WebKit::LayerTreeHostQt::didUninstallPageOverlay):
        (WebKit::LayerTreeHostQt::setPageOverlayNeedsDisplay):
        (WebKit::LayerTreeHostQt::flushPendingLayerChanges):
        (WebKit::LayerTreeHostQt::performScheduledLayerFlush):
        (WebKit::LayerTreeHostQt::layerFlushTimerFired):
        (WebKit::LayerTreeHostQt::createPageOverlayLayer):
        (WebKit::LayerTreeHostQt::destroyPageOverlayLayer):
        (WebKit::LayerTreeHostQt::notifyAnimationStarted):
        (WebKit::LayerTreeHostQt::notifySyncRequired):
        (WebKit::LayerTreeHostQt::paintContents):
        (WebKit::LayerTreeHostQt::showDebugBorders):
        (WebKit::LayerTreeHostQt::showRepaintCounter):
        (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
        * WebProcess/WebPage/qt/LayerTreeHostQt.h: Added.
        (WebKit::LayerTreeHostQt::layerTreeContext):
        (WebKit::LayerTreeHostQt::pauseRendering):
        (WebKit::LayerTreeHostQt::resumeRendering):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Scripts/webkit2/messages.py
Source/WebKit2/Shared/LayerTreeContext.h
Source/WebKit2/Shared/qt/LayerTreeContextQt.cpp
Source/WebKit2/UIProcess/DrawingAreaProxy.h
Source/WebKit2/UIProcess/DrawingAreaProxy.messages.in
Source/WebKit2/WebKit2.pro
Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp
Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp
Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp
Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.h [new file with mode: 0644]