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

Unified Diff: cc/animation/transform_operations.cc

Issue 297163010: Fixed the order of applying transform operations for animation bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « cc/animation/transform_operation.cc ('k') | cc/animation/transform_operations_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/transform_operations.cc
diff --git a/cc/animation/transform_operations.cc b/cc/animation/transform_operations.cc
index 2d34290387eba6db6b57c313861308ac82f36619..34c526b9a40535d3decc0e33ec849105219b7e74 100644
--- a/cc/animation/transform_operations.cc
+++ b/cc/animation/transform_operations.cc
@@ -61,7 +61,11 @@ bool TransformOperations::BlendedBoundsForBox(const gfx::BoxF& box,
size_t num_operations =
std::max(from_identity ? 0 : from.operations_.size(),
to_identity ? 0 : operations_.size());
- for (size_t i = 0; i < num_operations; ++i) {
+
+ // Because we are squashing all of the matrices together when applying
+ // them to the animation, we must apply them in reverse order when
+ // not squashing them.
+ for (int i = num_operations - 1; i >= 0; --i) {
gfx::BoxF bounds_for_operation;
const TransformOperation* from_op =
from_identity ? NULL : &from.operations_[i];
« no previous file with comments | « cc/animation/transform_operation.cc ('k') | cc/animation/transform_operations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698