summaryrefslogtreecommitdiffstats
path: root/chromium/cc/animation/transform_operations.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/cc/animation/transform_operations.h')
-rw-r--r--chromium/cc/animation/transform_operations.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/chromium/cc/animation/transform_operations.h b/chromium/cc/animation/transform_operations.h
index 7c509349092..f086eb1baac 100644
--- a/chromium/cc/animation/transform_operations.h
+++ b/chromium/cc/animation/transform_operations.h
@@ -57,6 +57,20 @@ class CC_EXPORT TransformOperations {
SkMScalar max_progress,
gfx::BoxF* bounds) const;
+ // Returns true if these operations affect scale.
+ bool AffectsScale() const;
+
+ // Returns true if these operations are only translations.
+ bool IsTranslation() const;
+
+ // Sets |max_scale| to be the maximum scale in any dimension when calling
+ // Blend on |from| with progress in the range [min_progress, max_progress]. If
+ // this maximum scale cannot be computed, returns false.
+ bool MaximumScale(const TransformOperations& from,
+ SkMScalar min_progress,
+ SkMScalar max_progress,
+ float* max_scale) const;
+
// Returns true if this operation and its descendants have the same types
// as other and its descendants.
bool MatchesTypes(const TransformOperations& other) const;
@@ -84,6 +98,11 @@ class CC_EXPORT TransformOperations {
bool ComputeDecomposedTransform() const;
+ // If these operations have no more than one scale operation, and if the only
+ // other operations are translations, sets |scale| to the scale component
+ // of these operations. Otherwise, returns false.
+ bool ScaleComponent(gfx::Vector3dF* scale) const;
+
// For efficiency, we cache the decomposed transform.
mutable scoped_ptr<gfx::DecomposedTransform> decomposed_transform_;
mutable bool decomposed_transform_dirty_;