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

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

Issue 584503005: Make scroll offset type of float in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: link crbug to TODO Created 6 years, 2 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/animation/scroll_offset_animation_curve_unittest.cc ('k') | cc/base/math_util.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 #ifndef CC_BASE_MATH_UTIL_H_ 5 #ifndef CC_BASE_MATH_UTIL_H_
6 #define CC_BASE_MATH_UTIL_H_ 6 #define CC_BASE_MATH_UTIL_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <cmath> 9 #include <cmath>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
15 #include "ui/gfx/box_f.h" 15 #include "ui/gfx/box_f.h"
16 #include "ui/gfx/geometry/scroll_offset.h"
16 #include "ui/gfx/point3_f.h" 17 #include "ui/gfx/point3_f.h"
17 #include "ui/gfx/point_f.h" 18 #include "ui/gfx/point_f.h"
18 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
19 #include "ui/gfx/transform.h" 20 #include "ui/gfx/transform.h"
20 21
21 namespace base { 22 namespace base {
22 class Value; 23 class Value;
23 namespace debug { 24 namespace debug {
24 class TracedValue; 25 class TracedValue;
25 } 26 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 static void AddToTracedValue(const gfx::Rect& r, 206 static void AddToTracedValue(const gfx::Rect& r,
206 base::debug::TracedValue* res); 207 base::debug::TracedValue* res);
207 static void AddToTracedValue(const gfx::PointF& q, 208 static void AddToTracedValue(const gfx::PointF& q,
208 base::debug::TracedValue* res); 209 base::debug::TracedValue* res);
209 static void AddToTracedValue(const gfx::Point3F&, 210 static void AddToTracedValue(const gfx::Point3F&,
210 base::debug::TracedValue* res); 211 base::debug::TracedValue* res);
211 static void AddToTracedValue(const gfx::Vector2d& v, 212 static void AddToTracedValue(const gfx::Vector2d& v,
212 base::debug::TracedValue* res); 213 base::debug::TracedValue* res);
213 static void AddToTracedValue(const gfx::Vector2dF& v, 214 static void AddToTracedValue(const gfx::Vector2dF& v,
214 base::debug::TracedValue* res); 215 base::debug::TracedValue* res);
216 static void AddToTracedValue(const gfx::ScrollOffset& v,
217 base::debug::TracedValue* res);
215 static void AddToTracedValue(const gfx::QuadF& q, 218 static void AddToTracedValue(const gfx::QuadF& q,
216 base::debug::TracedValue* res); 219 base::debug::TracedValue* res);
217 static void AddToTracedValue(const gfx::RectF& rect, 220 static void AddToTracedValue(const gfx::RectF& rect,
218 base::debug::TracedValue* res); 221 base::debug::TracedValue* res);
219 static void AddToTracedValue(const gfx::Transform& transform, 222 static void AddToTracedValue(const gfx::Transform& transform,
220 base::debug::TracedValue* res); 223 base::debug::TracedValue* res);
221 static void AddToTracedValue(const gfx::BoxF& box, 224 static void AddToTracedValue(const gfx::BoxF& box,
222 base::debug::TracedValue* res); 225 base::debug::TracedValue* res);
223 226
224 // Returns a base::Value representation of the floating point value. 227 // Returns a base::Value representation of the floating point value.
225 // If the value is inf, returns max double/float representation. 228 // If the value is inf, returns max double/float representation.
226 static double AsDoubleSafely(double value); 229 static double AsDoubleSafely(double value);
227 static float AsFloatSafely(float value); 230 static float AsFloatSafely(float value);
228 }; 231 };
229 232
230 } // namespace cc 233 } // namespace cc
231 234
232 #endif // CC_BASE_MATH_UTIL_H_ 235 #endif // CC_BASE_MATH_UTIL_H_
OLDNEW
« no previous file with comments | « cc/animation/scroll_offset_animation_curve_unittest.cc ('k') | cc/base/math_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698