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

Unified Diff: ui/gfx/transform.cc

Issue 11931017: Use explicit constructor-enums for SkMatrix44, either kUninitialized or kIdentity (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | ui/gfx/transform_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/transform.cc
===================================================================
--- ui/gfx/transform.cc (revision 177135)
+++ ui/gfx/transform.cc (working copy)
@@ -83,7 +83,7 @@
0, cosTheta, sinTheta,
0, -sinTheta, cosTheta);
} else {
- SkMatrix44 rot;
+ SkMatrix44 rot(SkMatrix44::kUninitialized_Constructor);
rot.set3x3(1, 0, 0,
0, cosTheta, sinTheta,
0, -sinTheta, cosTheta);
@@ -102,7 +102,7 @@
0, 1, 0,
sinTheta, 0, cosTheta);
} else {
- SkMatrix44 rot;
+ SkMatrix44 rot(SkMatrix44::kUninitialized_Constructor);
rot.set3x3(cosTheta, 0, -sinTheta,
0, 1, 0,
sinTheta, 0, cosTheta);
@@ -119,7 +119,7 @@
-sinTheta, cosTheta, 0,
0, 0, 1);
} else {
- SkMatrix44 rot;
+ SkMatrix44 rot(SkMatrix44::kUninitialized_Constructor);
rot.set3x3(cosTheta, sinTheta, 0,
-sinTheta, cosTheta, 0,
0, 0, 1);
@@ -134,7 +134,7 @@
SkDoubleToMScalar(axis.z()),
SkDoubleToMScalar(degrees));
} else {
- SkMatrix44 rot;
+ SkMatrix44 rot(SkMatrix44::kUninitialized_Constructor);
rot.setRotateDegreesAbout(SkDoubleToMScalar(axis.x()),
SkDoubleToMScalar(axis.y()),
SkDoubleToMScalar(axis.z()),
@@ -167,7 +167,7 @@
if (matrix_.isIdentity())
matrix_.setDouble(0, 1, TanDegrees(angle_x));
else {
- SkMatrix44 skew;
+ SkMatrix44 skew(SkMatrix44::kIdentity_Constructor);
skew.setDouble(0, 1, TanDegrees(angle_x));
matrix_.preConcat(skew);
}
@@ -177,7 +177,7 @@
if (matrix_.isIdentity())
matrix_.setDouble(1, 0, TanDegrees(angle_y));
else {
- SkMatrix44 skew;
+ SkMatrix44 skew(SkMatrix44::kIdentity_Constructor);
skew.setDouble(1, 0, TanDegrees(angle_y));
matrix_.preConcat(skew);
}
@@ -189,7 +189,7 @@
if (matrix_.isIdentity())
matrix_.setDouble(3, 2, -1.0 / depth);
else {
- SkMatrix44 m;
+ SkMatrix44 m(SkMatrix44::kIdentity_Constructor);
m.setDouble(3, 2, -1.0 / depth);
matrix_.preConcat(m);
}
@@ -321,7 +321,7 @@
bool Transform::TransformPointReverse(Point& point) const {
// TODO(sad): Try to avoid trying to invert the matrix.
- SkMatrix44 inverse;
+ SkMatrix44 inverse(SkMatrix44::kUninitialized_Constructor);
if (!matrix_.invert(&inverse))
return false;
@@ -331,7 +331,7 @@
bool Transform::TransformPointReverse(Point3F& point) const {
// TODO(sad): Try to avoid trying to invert the matrix.
- SkMatrix44 inverse;
+ SkMatrix44 inverse(SkMatrix44::kUninitialized_Constructor);
if (!matrix_.invert(&inverse))
return false;
@@ -353,7 +353,7 @@
if (matrix_.isIdentity())
return true;
- SkMatrix44 inverse;
+ SkMatrix44 inverse(SkMatrix44::kUninitialized_Constructor);
if (!matrix_.invert(&inverse))
return false;
« no previous file with comments | « no previous file | ui/gfx/transform_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698