// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CC_ANIMATION_KEYFRAME_EFFECT_H_ #define CC_ANIMATION_KEYFRAME_EFFECT_H_ #include <limits> #include <memory> #include <string> #include <vector> #include "base/memory/raw_ptr.h" #include "base/memory/ref_counted.h" #include "base/time/time.h" #include "cc/animation/animation_events.h" #include "cc/animation/animation_export.h" #include "cc/animation/element_animations.h" #include "cc/animation/keyframe_model.h" #include "cc/paint/element_id.h" #include "cc/trees/mutator_host_client.h" #include "cc/trees/target_property.h" #include "ui/gfx/animation/keyframe/keyframe_effect.h" #include "ui/gfx/geometry/box_f.h" #include "ui/gfx/geometry/point_f.h" namespace cc { class Animation; enum class PauseCondition { … }; struct PropertyAnimationState; // Specially designed for a custom property animation on a paint worklet // element. It doesn't require an element id to run on the compositor thread. // However, our animation system requires the element to be on the property // tree in order to keep ticking the animation. Therefore, we use a reserved // element id for this animation so that the compositor animation system // recognize it. We do not use ElementId because it's an invalid element id. inline constexpr ElementId kReservedElementIdForPaintWorklet( std::numeric_limits<ElementId::InternalValue>::max() - 1); // A KeyframeEffect owns a group of KeyframeModels for a single target // (identified by an ElementId). It is responsible for managing the // KeyframeModels' running states (starting, running, paused, etc), as well as // ticking the KeyframeModels when it is requested to produce new outputs for a // given time. // // Note that a single KeyframeEffect may not own all the KeyframeModels for a // given target. KeyframeEffect is only a grouping mechanism for related // KeyframeModels. The commonality between keyframe models on the same target // is found via ElementAnimations - there is only one ElementAnimations for a // given target. class CC_ANIMATION_EXPORT KeyframeEffect : public gfx::KeyframeEffect { … }; } // namespace cc #endif // CC_ANIMATION_KEYFRAME_EFFECT_H_