diff options
author | ajuma@chromium.org <ajuma@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-15 22:03:14 +0000 |
---|---|---|
committer | ajuma@chromium.org <ajuma@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-15 22:03:14 +0000 |
commit | db2586f0cdfde4c4dc873e3bcd1d856382d4d2fa (patch) | |
tree | 05e0953f2ca06ca716bf458ece2d0f16e89f691e /cc/animation/animation_curve.h | |
parent | 61f697f26142f5081aaee176ccd82a2af170eabf (diff) | |
download | chromium_src-db2586f0cdfde4c4dc873e3bcd1d856382d4d2fa.zip chromium_src-db2586f0cdfde4c4dc873e3bcd1d856382d4d2fa.tar.gz chromium_src-db2586f0cdfde4c4dc873e3bcd1d856382d4d2fa.tar.bz2 |
Compute bounds of animated layers
This adds support for computing the bounds of a box when
transformed by the animations currently running on layer.
This CL handles Scale and Translate animations, leaving
other TransformOperations for future CLs.
BUG=252472
Review URL: https://chromiumcodereview.appspot.com/21604002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/animation/animation_curve.h')
-rw-r--r-- | cc/animation/animation_curve.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cc/animation/animation_curve.h b/cc/animation/animation_curve.h index 3860234..f4cdb10 100644 --- a/cc/animation/animation_curve.h +++ b/cc/animation/animation_curve.h @@ -10,6 +10,10 @@ #include "cc/output/filter_operations.h" #include "ui/gfx/transform.h" +namespace gfx { +class BoxF; +} + namespace cc { class FilterAnimationCurve; @@ -49,6 +53,12 @@ class CC_EXPORT TransformAnimationCurve : public AnimationCurve { virtual gfx::Transform GetValue(double t) const = 0; + // Sets |bounds| to be the bounding box for the region within which |box| + // will move during this animation. If this region cannot be computed, + // returns false. + virtual bool AnimatedBoundsForBox(const gfx::BoxF& box, + gfx::BoxF* bounds) const = 0; + // Partial Animation implementation. virtual CurveType Type() const OVERRIDE; }; |