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

Unified Diff: ui/gfx/transform_util.cc

Issue 1071803003: Update matrix distance metric to account for snapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grammar Created 5 years, 8 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 | « ui/gfx/transform_util.h ('k') | ui/gfx/transform_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/transform_util.cc
diff --git a/ui/gfx/transform_util.cc b/ui/gfx/transform_util.cc
index c23f87d8448c49de146a68b9ff10152b2a04f8f3..5c9fb50ff159b948cd9911a247a830258c65a652 100644
--- a/ui/gfx/transform_util.cc
+++ b/ui/gfx/transform_util.cc
@@ -515,20 +515,4 @@ std::string DecomposedTransform::ToString() const {
quaternion[3]);
}
-float MatrixDistance(const Transform& a, const Transform& b) {
- double sum = 0.0;
-
- const SkMatrix44& a_data = a.matrix();
- const SkMatrix44& b_data = b.matrix();
-
- for (int row = 0; row < 4; ++row) {
- for (int col = 0; col < 4; ++col) {
- double diff = a_data.get(row, col) - b_data.get(row, col);
- sum += diff * diff;
- }
- }
-
- return static_cast<float>(std::sqrt(sum));
-}
-
} // namespace gfx
« no previous file with comments | « ui/gfx/transform_util.h ('k') | ui/gfx/transform_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698