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

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: change to epsilon 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
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::IsFloatNearlyTheSame(float left, float right) {
enne (OOO) 2017/04/21 22:54:33 I'm not sure we need both IsFloatNearlyTheSame and
821 return IsNearlyTheSame(left, right);
822 }
823
820 bool MathUtil::IsNearlyTheSameForTesting(float left, float right) { 824 bool MathUtil::IsNearlyTheSameForTesting(float left, float right) {
821 return IsNearlyTheSame(left, right); 825 return IsNearlyTheSame(left, right);
822 } 826 }
823 827
824 bool MathUtil::IsNearlyTheSameForTesting(const gfx::PointF& left, 828 bool MathUtil::IsNearlyTheSameForTesting(const gfx::PointF& left,
825 const gfx::PointF& right) { 829 const gfx::PointF& right) {
826 return IsNearlyTheSame(left, right); 830 return IsNearlyTheSame(left, right);
827 } 831 }
828 832
829 bool MathUtil::IsNearlyTheSameForTesting(const gfx::Point3F& left, 833 bool MathUtil::IsNearlyTheSameForTesting(const gfx::Point3F& left,
830 const gfx::Point3F& right) { 834 const gfx::Point3F& right) {
831 return IsNearlyTheSame(left, right); 835 return IsNearlyTheSame(left, right);
832 } 836 }
833 837
834 } // namespace cc 838 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698