Index: ui/gfx/transform.cc |
diff --git a/ui/gfx/transform.cc b/ui/gfx/transform.cc |
index e1d77c343f9181d9a5ed4010ced36cfcd065d0e1..0e0bea8086b3a8034eb5de7f2811421467996037 100644 |
--- a/ui/gfx/transform.cc |
+++ b/ui/gfx/transform.cc |
@@ -116,6 +116,9 @@ void Transform::SetSkewY(double angle) { |
} |
void Transform::SetPerspectiveDepth(double depth) { |
+ if (depth == 0) |
+ return; |
Ian Vollick
2012/11/16 13:44:46
Good catch. Thank you!
|
+ |
SkMatrix44 m; |
MSET(m, 3, 2, -1.0 / depth); |
matrix_ = m; |
@@ -184,6 +187,9 @@ void Transform::ConcatSkewY(double angle_y) { |
} |
void Transform::ConcatPerspectiveDepth(double depth) { |
+ if (depth == 0) |
+ return; |
+ |
SkMatrix44 m; |
MSET(m, 3, 2, -1.0 / depth); |
matrix_.postConcat(m); |
@@ -252,6 +258,9 @@ void Transform::PreconcatSkewY(double angle_y) { |
} |
void Transform::PreconcatPerspectiveDepth(double depth) { |
+ if (depth == 0) |
+ return; |
+ |
SkMatrix44 m; |
MSET(m, 3, 2, -1.0 / depth); |
matrix_.preConcat(m); |