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

Unified Diff: cc/animation/transform_operations.cc

Issue 1164263003: Don't set decomposed_transform_dirty_ bit dirty on appending Identity transform Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | 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 970eb0dd455a7595d7e2304fec4f766f5f996293..2d99972e934c25f7c5faa004ee377d5e3818a029 100644
--- a/cc/animation/transform_operations.cc
+++ b/cc/animation/transform_operations.cc
@@ -195,7 +195,8 @@ void TransformOperations::AppendTranslate(SkMScalar x,
to_add.translate.y = y;
to_add.translate.z = z;
operations_.push_back(to_add);
- decomposed_transform_dirty_ = true;
+ if (!to_add.IsIdentity())
+ decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendRotate(SkMScalar x,
@@ -210,7 +211,8 @@ void TransformOperations::AppendRotate(SkMScalar x,
to_add.rotate.axis.z = z;
to_add.rotate.angle = degrees;
operations_.push_back(to_add);
- decomposed_transform_dirty_ = true;
+ if (!to_add.IsIdentity())
+ decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendScale(SkMScalar x, SkMScalar y, SkMScalar z) {
@@ -221,7 +223,8 @@ void TransformOperations::AppendScale(SkMScalar x, SkMScalar y, SkMScalar z) {
to_add.scale.y = y;
to_add.scale.z = z;
operations_.push_back(to_add);
- decomposed_transform_dirty_ = true;
+ if (!to_add.IsIdentity())
+ decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendSkew(SkMScalar x, SkMScalar y) {
@@ -232,7 +235,8 @@ void TransformOperations::AppendSkew(SkMScalar x, SkMScalar y) {
to_add.skew.x = x;
to_add.skew.y = y;
operations_.push_back(to_add);
- decomposed_transform_dirty_ = true;
+ if (!to_add.IsIdentity())
+ decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendPerspective(SkMScalar depth) {
@@ -241,7 +245,8 @@ void TransformOperations::AppendPerspective(SkMScalar depth) {
to_add.type = TransformOperation::TRANSFORM_OPERATION_PERSPECTIVE;
to_add.perspective_depth = depth;
operations_.push_back(to_add);
- decomposed_transform_dirty_ = true;
+ if (!to_add.IsIdentity())
+ decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendMatrix(const gfx::Transform& matrix) {
@@ -249,7 +254,8 @@ void TransformOperations::AppendMatrix(const gfx::Transform& matrix) {
to_add.matrix = matrix;
to_add.type = TransformOperation::TRANSFORM_OPERATION_MATRIX;
operations_.push_back(to_add);
- decomposed_transform_dirty_ = true;
+ if (!to_add.IsIdentity())
+ decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendIdentity() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698