[WK2][Qt] Move Accelerated Composite animations to UIProcess
authorigor.oliveira@openbossa.org <igor.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Nov 2011 17:03:06 +0000 (17:03 +0000)
committerigor.oliveira@openbossa.org <igor.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Nov 2011 17:03:06 +0000 (17:03 +0000)
commite0410a4ca24f38043593ac244bad2191d1205f70
tree1522e7809dacf937bb2b67e9f05bda7d65f3366b
parent43af4fa5b230686ee399388148141b9d9bf426af
[WK2][Qt] Move Accelerated Composite animations to UIProcess

Source/WebCore:

Add helper method to synchronize animations in TextureMapper.

Reviewed by Noam Rosenthal

* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperNode::syncAnimationsRecursively):
* platform/graphics/texmap/TextureMapperNode.h:

Source/WebKit2:

Currently, all the accelerated compositing animations are applied in WebProcess and
for each frame generated, WebProcess needs to sync with UIProcess.

This patch moves the accelerated compositing animations to UIProcess reducing the
amount of synchronization messages between WebProcess and UIProcess, this is done
sending animations information to UIProcess.

Reviewed by Noam Rosenthal

* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):

Encode/Decode RefPtr<Animation> instead of Animation class. This facilitates
the data serialization.

* Shared/WebCoreArgumentCoders.h:
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
(WebKit::WebLayerAnimation::encode):
(WebKit::WebLayerAnimation::decode):

Create WebLayerAnimation struct, it is used to send animation information
to UIProcess.

* Shared/WebLayerTreeInfo.h:
(WebKit::WebLayerAnimation::WebLayerAnimation):
* UIProcess/LayerTreeHostProxy.h:
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::didFireViewportUpdateTimer):
(WebKit::LayerTreeHostProxy::syncLayerParameters):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::addAnimation):
(WebCore::WebGraphicsLayer::pauseAnimation):
(WebCore::WebGraphicsLayer::removeAnimation):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperNode.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
Source/WebKit2/Shared/WebCoreArgumentCoders.h
Source/WebKit2/Shared/WebLayerTreeInfo.cpp
Source/WebKit2/Shared/WebLayerTreeInfo.h
Source/WebKit2/UIProcess/LayerTreeHostProxy.h
Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp