本文整理汇总了C++中CompositeAnimation::animate方法的典型用法代码示例。如果您正苦于以下问题:C++ CompositeAnimation::animate方法的具体用法?C++ CompositeAnimation::animate怎么用?C++ CompositeAnimation::animate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CompositeAnimation
的用法示例。
在下文中一共展示了CompositeAnimation::animate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateAnimations
RenderStyle* AnimationController::updateAnimations(RenderObject* renderer, RenderStyle* newStyle)
{
// don't do anything if we're in the cache
if (!renderer->document() || renderer->document()->inPageCache())
return newStyle;
RenderStyle* oldStyle = renderer->style();
if ((!oldStyle || (!oldStyle->animations() && !oldStyle->transitions())) &&
(!newStyle->animations() && !newStyle->transitions()))
return newStyle;
RenderStyle* blendedStyle = newStyle;
// Fetch our current set of implicit animations from a hashtable. We then compare them
// against the animations in the style and make sure we're in sync. If destination values
// have changed, we reset the animation. We then do a blend to get new values and we return
// a new style.
ASSERT(renderer->element()); // FIXME: We do not animate generated content yet.
CompositeAnimation* rendererAnimations = m_data->accessCompositeAnimation(renderer);
blendedStyle = rendererAnimations->animate(renderer, oldStyle, newStyle);
m_data->updateAnimationTimer();
if (blendedStyle != newStyle) {
// If the animations/transitions change opacity or transform, we neeed to update
// the style to impose the stacking rules. Note that this is also
// done in CSSStyleSelector::adjustRenderStyle().
if (blendedStyle->hasAutoZIndex() && (blendedStyle->opacity() < 1.0f || blendedStyle->hasTransform()))
blendedStyle->setZIndex(0);
}
return blendedStyle;
}