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

Side by Side Diff: cc/base/math_util.cc

Issue 2803853007: Ignore rounding error between clip_layer_length_ and scroll_layer_length_ (Closed)
Patch Set: expose IsFloatNearlyTheSame & add comment Created 3 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 unified diff | Download patch
« no previous file with comments | « cc/base/math_util.h ('k') | cc/base/math_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifdef __SSE__ 10 #ifdef __SSE__
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 _mm_setcsr(orig_state_ | 0x8040); 810 _mm_setcsr(orig_state_ | 0x8040);
811 #endif 811 #endif
812 } 812 }
813 813
814 ScopedSubnormalFloatDisabler::~ScopedSubnormalFloatDisabler() { 814 ScopedSubnormalFloatDisabler::~ScopedSubnormalFloatDisabler() {
815 #ifdef __SSE__ 815 #ifdef __SSE__
816 _mm_setcsr(orig_state_); 816 _mm_setcsr(orig_state_);
817 #endif 817 #endif
818 } 818 }
819 819
820 bool MathUtil::IsNearlyTheSameForTesting(float left, float right) { 820 bool MathUtil::IsFloatNearlyTheSame(float left, float right) {
821 return IsNearlyTheSame(left, right); 821 return IsNearlyTheSame(left, right);
822 } 822 }
823 823
824 bool MathUtil::IsNearlyTheSameForTesting(const gfx::PointF& left, 824 bool MathUtil::IsNearlyTheSameForTesting(const gfx::PointF& left,
825 const gfx::PointF& right) { 825 const gfx::PointF& right) {
826 return IsNearlyTheSame(left, right); 826 return IsNearlyTheSame(left, right);
827 } 827 }
828 828
829 bool MathUtil::IsNearlyTheSameForTesting(const gfx::Point3F& left, 829 bool MathUtil::IsNearlyTheSameForTesting(const gfx::Point3F& left,
830 const gfx::Point3F& right) { 830 const gfx::Point3F& right) {
831 return IsNearlyTheSame(left, right); 831 return IsNearlyTheSame(left, right);
832 } 832 }
833 833
834 } // namespace cc 834 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/math_util.h ('k') | cc/base/math_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698