AnimationCollection*
CommonAnimationManager::GetAnimationsForCompositor(const nsIFrame* aFrame,
        nsCSSProperty aProperty)
{
    AnimationCollection* collection = GetAnimationCollection(aFrame);
    if (!collection ||
            !collection->HasCurrentAnimationOfProperty(aProperty) ||
            !collection->CanPerformOnCompositorThread(
                AnimationCollection::CanAnimate_AllowPartial)) {
        return nullptr;
    }

    // This animation can be done on the compositor.
    return collection;
}