| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/gfx/transform_util.h" | 5 #include "ui/gfx/transform_util.h" |
| 6 | 6 |
| 7 #include <algorithm> |
| 7 #include <cmath> | 8 #include <cmath> |
| 8 | 9 |
| 9 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
| 10 | 11 |
| 11 namespace gfx { | 12 namespace gfx { |
| 12 | 13 |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 SkMScalar Length3(SkMScalar v[3]) { | 16 SkMScalar Length3(SkMScalar v[3]) { |
| 16 return std::sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); | 17 return std::sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 } | 310 } |
| 310 | 311 |
| 311 matrix.preScale(decomp.scale[0], decomp.scale[1], decomp.scale[2]); | 312 matrix.preScale(decomp.scale[0], decomp.scale[1], decomp.scale[2]); |
| 312 | 313 |
| 313 Transform to_return; | 314 Transform to_return; |
| 314 to_return.matrix() = matrix; | 315 to_return.matrix() = matrix; |
| 315 return to_return; | 316 return to_return; |
| 316 } | 317 } |
| 317 | 318 |
| 318 } // namespace ui | 319 } // namespace ui |
| OLD | NEW |