Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: cc/animation/transform_operations.cc

Issue 642983003: cc: Make PictureLayerImpl use a better choice for animated raster scale. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/animation/transform_operations.cc
diff --git a/cc/animation/transform_operations.cc b/cc/animation/transform_operations.cc
index 6d8ad0f4414163d62dd6cb1e33b2b75090977a51..7c328af6aac9eaf96428b768900d9f731be305b5 100644
--- a/cc/animation/transform_operations.cc
+++ b/cc/animation/transform_operations.cc
@@ -114,41 +114,6 @@ bool TransformOperations::IsTranslation() const {
return true;
}
-bool TransformOperations::MaximumScale(const TransformOperations& from,
- SkMScalar min_progress,
- SkMScalar max_progress,
- float* max_scale) const {
- if (!MatchesTypes(from))
- return false;
-
- gfx::Vector3dF from_scale;
- gfx::Vector3dF to_scale;
-
- if (!from.ScaleComponent(&from_scale) || !ScaleComponent(&to_scale))
- return false;
-
- gfx::Vector3dF scale_at_min_progress(
- std::abs(gfx::Tween::FloatValueBetween(
- min_progress, from_scale.x(), to_scale.x())),
- std::abs(gfx::Tween::FloatValueBetween(
- min_progress, from_scale.y(), to_scale.y())),
- std::abs(gfx::Tween::FloatValueBetween(
- min_progress, from_scale.z(), to_scale.z())));
- gfx::Vector3dF scale_at_max_progress(
- std::abs(gfx::Tween::FloatValueBetween(
- max_progress, from_scale.x(), to_scale.x())),
- std::abs(gfx::Tween::FloatValueBetween(
- max_progress, from_scale.y(), to_scale.y())),
- std::abs(gfx::Tween::FloatValueBetween(
- max_progress, from_scale.z(), to_scale.z())));
-
- gfx::Vector3dF max_scale_3d = scale_at_min_progress;
- max_scale_3d.SetToMax(scale_at_max_progress);
- *max_scale =
- std::max(max_scale_3d.x(), std::max(max_scale_3d.y(), max_scale_3d.z()));
- return true;
-}
-
bool TransformOperations::ScaleComponent(gfx::Vector3dF* scale) const {
*scale = gfx::Vector3dF(1.f, 1.f, 1.f);
bool has_scale_component = false;

Powered by Google App Engine
This is Rietveld 408576698