[GTK][AC] Implement opacity animation with clutter ac backend
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 12:21:43 +0000 (12:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 12:21:43 +0000 (12:21 +0000)
commit5c3326f1b39e04c754d93f4e507e25e744475524
treeb102b0256d201c47898bab3bf35ff2b30ab72990
parente41fb095728f0ef0bd7a0bdebbf7d97bbbf41844
[GTK][AC] Implement opacity animation with clutter ac backend
https://bugs.webkit.org/show_bug.cgi?id=108961

Patch by ChangSeok Oh <shivamidow@gmail.com> on 2013-02-07
Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Implement opacity animation with clutter ac backend.
Almost all implementations of GraphicsLayerClutter are based on mac port's one.
PlatformClutterAnimation interfaces are also similar with mac port, but they are implemented
with native clutter APIs.
This patch includes only opacity animation related changes, so many APIs might be empty.
Remained animations like rotation and translate will be dealt in another patches.

Covered by existing animation tests.

* GNUmakefile.list.am:
* platform/graphics/clutter/GraphicsLayerActor.cpp:
(graphicsLayerActorGetAnimationForKey):
* platform/graphics/clutter/GraphicsLayerActor.h:
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore):
(WebCore::propertyIdToString):
(WebCore::animationIdentifier):
(WebCore::animationHasStepsTimingFunction):
(WebCore::GraphicsLayerClutter::setOpacity):
(WebCore::GraphicsLayerClutter::updateAnimations):
(WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerClutter::setupAnimation):
(WebCore::GraphicsLayerClutter::timingFunctionForAnimationValue):
(WebCore::GraphicsLayerClutter::createBasicAnimation):
(WebCore::GraphicsLayerClutter::createKeyframeAnimation):
(WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
(WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
(WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
(WebCore::GraphicsLayerClutter::createAnimationFromKeyframes):
(WebCore::GraphicsLayerClutter::addAnimation):
(WebCore::GraphicsLayerClutter::removeClutterAnimationFromLayer):
(WebCore::GraphicsLayerClutter::pauseClutterAnimationOnLayer):
(WebCore::GraphicsLayerClutter::setAnimationOnLayer):
(WebCore::GraphicsLayerClutter::setAnimationEndpoints):
(WebCore::GraphicsLayerClutter::setAnimationKeyframes):
(WebCore::GraphicsLayerClutter::animatedLayer):
* platform/graphics/clutter/GraphicsLayerClutter.h:
(GraphicsLayerClutter):
(WebCore::GraphicsLayerClutter::LayerPropertyAnimation::LayerPropertyAnimation):
(LayerPropertyAnimation):
(WebCore::GraphicsLayerClutter::AnimationProcessingAction::AnimationProcessingAction):
(AnimationProcessingAction):
* platform/graphics/clutter/PlatformClutterAnimation.cpp: Added.
(WebCore):
(WebCore::timelineStartedCallback):
(WebCore::toClutterAnimationMode):
(WebCore::PlatformClutterAnimation::stringToAnimatedPropertyType):
(WebCore::PlatformClutterAnimation::create):
(WebCore::PlatformClutterAnimation::PlatformClutterAnimation):
(WebCore::PlatformClutterAnimation::~PlatformClutterAnimation):
(WebCore::PlatformClutterAnimation::supportsValueFunction):
(WebCore::PlatformClutterAnimation::beginTime):
(WebCore::PlatformClutterAnimation::setBeginTime):
(WebCore::PlatformClutterAnimation::duration):
(WebCore::PlatformClutterAnimation::setDuration):
(WebCore::PlatformClutterAnimation::speed):
(WebCore::PlatformClutterAnimation::setSpeed):
(WebCore::PlatformClutterAnimation::timeOffset):
(WebCore::PlatformClutterAnimation::setTimeOffset):
(WebCore::PlatformClutterAnimation::repeatCount):
(WebCore::PlatformClutterAnimation::setRepeatCount):
(WebCore::PlatformClutterAnimation::autoreverses):
(WebCore::PlatformClutterAnimation::setAutoreverses):
(WebCore::PlatformClutterAnimation::fillMode):
(WebCore::PlatformClutterAnimation::setFillMode):
(WebCore::PlatformClutterAnimation::setTimingFunction):
(WebCore::PlatformClutterAnimation::copyTimingFunctionFrom):
(WebCore::PlatformClutterAnimation::isRemovedOnCompletion):
(WebCore::PlatformClutterAnimation::setRemovedOnCompletion):
(WebCore::PlatformClutterAnimation::isAdditive):
(WebCore::PlatformClutterAnimation::setAdditive):
(WebCore::PlatformClutterAnimation::valueFunction):
(WebCore::PlatformClutterAnimation::setValueFunction):
(WebCore::PlatformClutterAnimation::setFromValue):
(WebCore::PlatformClutterAnimation::copyFromValueFrom):
(WebCore::PlatformClutterAnimation::setToValue):
(WebCore::PlatformClutterAnimation::copyToValueFrom):
(WebCore::PlatformClutterAnimation::setValues):
(WebCore::PlatformClutterAnimation::copyValuesFrom):
(WebCore::PlatformClutterAnimation::setKeyTimes):
(WebCore::PlatformClutterAnimation::copyKeyTimesFrom):
(WebCore::PlatformClutterAnimation::setTimingFunctions):
(WebCore::PlatformClutterAnimation::copyTimingFunctionsFrom):
(WebCore::PlatformClutterAnimation::animationDidStart):
(WebCore::PlatformClutterAnimation::timeline):
(WebCore::PlatformClutterAnimation::addOpacityTransition):
(WebCore::PlatformClutterAnimation::addAnimationForKey):
(WebCore::PlatformClutterAnimation::removeAnimationForKey):
* platform/graphics/clutter/PlatformClutterAnimation.h: Added.
(WebCore):
(PlatformClutterAnimation):
(WebCore::PlatformClutterAnimation::animationType):

Source/WebKit/gtk:

Add AnimationTrigger for ac compositing.

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::allowedCompositingTriggers):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.cpp
Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.h
Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp
Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.h
Source/WebCore/platform/graphics/clutter/PlatformClutterAnimation.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/clutter/PlatformClutterAnimation.h [new file with mode: 0644]
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp