| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/base/math_util.h" | 5 #include "cc/base/math_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 base::trace_event::TracedValue* res) { | 772 base::trace_event::TracedValue* res) { |
| 773 res->BeginArray(name); | 773 res->BeginArray(name); |
| 774 res->AppendInteger(r.x()); | 774 res->AppendInteger(r.x()); |
| 775 res->AppendInteger(r.y()); | 775 res->AppendInteger(r.y()); |
| 776 res->AppendInteger(r.width()); | 776 res->AppendInteger(r.width()); |
| 777 res->AppendInteger(r.height()); | 777 res->AppendInteger(r.height()); |
| 778 res->EndArray(); | 778 res->EndArray(); |
| 779 } | 779 } |
| 780 | 780 |
| 781 void MathUtil::AddToTracedValue(const char* name, | 781 void MathUtil::AddToTracedValue(const char* name, |
| 782 const gfx::Point& pt, |
| 783 base::trace_event::TracedValue* res) { |
| 784 res->BeginArray(name); |
| 785 res->AppendInteger(pt.x()); |
| 786 res->AppendInteger(pt.y()); |
| 787 res->EndArray(); |
| 788 } |
| 789 |
| 790 void MathUtil::AddToTracedValue(const char* name, |
| 782 const gfx::PointF& pt, | 791 const gfx::PointF& pt, |
| 783 base::trace_event::TracedValue* res) { | 792 base::trace_event::TracedValue* res) { |
| 784 res->BeginArray(name); | 793 res->BeginArray(name); |
| 785 res->AppendDouble(pt.x()); | 794 res->AppendDouble(pt.x()); |
| 786 res->AppendDouble(pt.y()); | 795 res->AppendDouble(pt.y()); |
| 787 res->EndArray(); | 796 res->EndArray(); |
| 788 } | 797 } |
| 789 | 798 |
| 790 void MathUtil::AddToTracedValue(const char* name, | 799 void MathUtil::AddToTracedValue(const char* name, |
| 791 const gfx::Point3F& pt, | 800 const gfx::Point3F& pt, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 transform.matrix().getFloat(2, 0)); | 898 transform.matrix().getFloat(2, 0)); |
| 890 } | 899 } |
| 891 | 900 |
| 892 gfx::Vector3dF MathUtil::GetYAxis(const gfx::Transform& transform) { | 901 gfx::Vector3dF MathUtil::GetYAxis(const gfx::Transform& transform) { |
| 893 return gfx::Vector3dF(transform.matrix().getFloat(0, 1), | 902 return gfx::Vector3dF(transform.matrix().getFloat(0, 1), |
| 894 transform.matrix().getFloat(1, 1), | 903 transform.matrix().getFloat(1, 1), |
| 895 transform.matrix().getFloat(2, 1)); | 904 transform.matrix().getFloat(2, 1)); |
| 896 } | 905 } |
| 897 | 906 |
| 898 } // namespace cc | 907 } // namespace cc |
| OLD | NEW |