chromium/cc/animation/element_animations.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/animation/element_animations.h"

#include <stddef.h>

#include <algorithm>
#include <utility>
#include <vector>

#include "base/notreached.h"
#include "base/observer_list.h"
#include "cc/animation/animation_delegate.h"
#include "cc/animation/animation_events.h"
#include "cc/animation/animation_host.h"
#include "cc/animation/keyframe_effect.h"
#include "cc/animation/keyframe_model.h"
#include "cc/paint/filter_operations.h"
#include "cc/trees/mutator_host_client.h"
#include "ui/gfx/animation/keyframe/keyframed_animation_curve.h"
#include "ui/gfx/geometry/box_f.h"
#include "ui/gfx/geometry/transform_operations.h"

namespace cc {

namespace {

// After BlinkGenPropertyTrees, the targeted ElementId depends on the property
// being mutated. If an ElementId is set on the KeyframeModel, we should apply
// the mutation to the specific element.
// TODO(flackr): Remove ElementId from ElementAnimations once all element
// tracking is done on the KeyframeModel - https://crbug.com/900241
ElementId CalculateTargetElementId(const ElementAnimations* element_animations,
                                   const gfx::KeyframeModel* keyframe_model) {}

bool UsingPaintWorklet(int property_index) {}

}  // namespace

scoped_refptr<ElementAnimations> ElementAnimations::Create(
    AnimationHost* host,
    ElementId element_id) {}

ElementAnimations::ElementAnimations(AnimationHost* host, ElementId element_id)
    :{}

ElementAnimations::~ElementAnimations() = default;

void ElementAnimations::InitAffectedElementTypes() {}

gfx::TargetProperties ElementAnimations::GetPropertiesMaskForAnimationState() {}

void ElementAnimations::ClearAffectedElementTypes(
    const PropertyToElementIdMap& element_id_map) {}

void ElementAnimations::RemoveKeyframeEffects() {}

void ElementAnimations::AddKeyframeEffect(KeyframeEffect* keyframe_effect) {}

void ElementAnimations::RemoveKeyframeEffect(KeyframeEffect* keyframe_effect) {}

bool ElementAnimations::IsEmpty() const {}

void ElementAnimations::SetNeedsPushProperties() {}

void ElementAnimations::PushPropertiesTo(
    scoped_refptr<ElementAnimations> element_animations_impl) const {}

void ElementAnimations::UpdateKeyframeEffectsTickingState() const {}

void ElementAnimations::RemoveKeyframeEffectsFromTicking() const {}

bool ElementAnimations::AnimationsPreserveAxisAlignment() const {}

float ElementAnimations::MaximumScale(ElementId element_id,
                                      ElementListType list_type) const {}

bool ElementAnimations::ScrollOffsetAnimationWasInterrupted() const {}

void ElementAnimations::OnFloatAnimated(const float& value,
                                        int target_property_id,
                                        gfx::KeyframeModel* keyframe_model) {}

void ElementAnimations::OnFilterAnimated(const FilterOperations& filters,
                                         int target_property_id,
                                         gfx::KeyframeModel* keyframe_model) {}

void ElementAnimations::OnColorAnimated(const SkColor& value,
                                        int target_property_id,
                                        gfx::KeyframeModel* keyframe_model) {}

void ElementAnimations::OnTransformAnimated(
    const gfx::TransformOperations& operations,
    int target_property_id,
    gfx::KeyframeModel* keyframe_model) {}

void ElementAnimations::OnScrollOffsetAnimated(
    const gfx::PointF& scroll_offset,
    int target_property_id,
    gfx::KeyframeModel* keyframe_model) {}

void ElementAnimations::InitClientAnimationState() {}

void ElementAnimations::UpdateMaximumScale(ElementId element_id,
                                           ElementListType list_type,
                                           float* cached_scale) {}

#if DCHECK_IS_ON()
static inline bool IsInvalidOrOne(float scale) {}
#endif

void ElementAnimations::UpdateClientAnimationState() {}

void ElementAnimations::AttachToCurve(gfx::AnimationCurve* c) {}

bool ElementAnimations::HasTickingKeyframeEffect() const {}

bool ElementAnimations::HasAnyKeyframeModel() const {}

bool ElementAnimations::HasAnyAnimationTargetingProperty(
    TargetProperty::Type property,
    ElementId element_id) const {}

bool ElementAnimations::IsPotentiallyAnimatingProperty(
    TargetProperty::Type target_property,
    ElementListType list_type) const {}

bool ElementAnimations::IsCurrentlyAnimatingProperty(
    TargetProperty::Type target_property,
    ElementListType list_type) const {}

void ElementAnimations::OnFilterAnimated(ElementListType list_type,
                                         const FilterOperations& filters,
                                         gfx::KeyframeModel* keyframe_model) {}

void ElementAnimations::OnBackdropFilterAnimated(
    ElementListType list_type,
    const FilterOperations& backdrop_filters,
    gfx::KeyframeModel* keyframe_model) {}

void ElementAnimations::OnOpacityAnimated(ElementListType list_type,
                                          float opacity,
                                          gfx::KeyframeModel* keyframe_model) {}

void ElementAnimations::OnCustomPropertyAnimated(
    PaintWorkletInput::PropertyValue property_value,
    KeyframeModel* keyframe_model,
    int target_property_id) {}

void ElementAnimations::OnTransformAnimated(
    ElementListType list_type,
    const gfx::Transform& transform,
    gfx::KeyframeModel* keyframe_model) {}

void ElementAnimations::OnScrollOffsetAnimated(
    ElementListType list_type,
    const gfx::PointF& scroll_offset,
    gfx::KeyframeModel* keyframe_model) {}

std::optional<gfx::PointF> ElementAnimations::ScrollOffsetForAnimation() const {}

PropertyToElementIdMap ElementAnimations::GetPropertyToElementIdMap() const {}

unsigned int ElementAnimations::CountKeyframesForTesting() const {}

KeyframeEffect* ElementAnimations::FirstKeyframeEffectForTesting() const {}

bool ElementAnimations::HasKeyframeEffectForTesting(
    const KeyframeEffect* keyframe) const {}

bool ElementAnimations::KeyframeModelAffectsActiveElements(
    gfx::KeyframeModel* keyframe_model) const {}

bool ElementAnimations::KeyframeModelAffectsPendingElements(
    gfx::KeyframeModel* keyframe_model) const {}

}  // namespace cc