[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