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

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

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-gfx: . Created 5 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
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>
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 static void AddToTracedValue(const char* name, 262 static void AddToTracedValue(const char* name,
263 const gfx::Size& s, 263 const gfx::Size& s,
264 base::trace_event::TracedValue* res); 264 base::trace_event::TracedValue* res);
265 static void AddToTracedValue(const char* name, 265 static void AddToTracedValue(const char* name,
266 const gfx::SizeF& s, 266 const gfx::SizeF& s,
267 base::trace_event::TracedValue* res); 267 base::trace_event::TracedValue* res);
268 static void AddToTracedValue(const char* name, 268 static void AddToTracedValue(const char* name,
269 const gfx::Rect& r, 269 const gfx::Rect& r,
270 base::trace_event::TracedValue* res); 270 base::trace_event::TracedValue* res);
271 static void AddToTracedValue(const char* name, 271 static void AddToTracedValue(const char* name,
272 const gfx::Point& q,
273 base::trace_event::TracedValue* res);
274 static void AddToTracedValue(const char* name,
272 const gfx::PointF& q, 275 const gfx::PointF& q,
273 base::trace_event::TracedValue* res); 276 base::trace_event::TracedValue* res);
274 static void AddToTracedValue(const char* name, 277 static void AddToTracedValue(const char* name,
275 const gfx::Point3F&, 278 const gfx::Point3F&,
276 base::trace_event::TracedValue* res); 279 base::trace_event::TracedValue* res);
277 static void AddToTracedValue(const char* name, 280 static void AddToTracedValue(const char* name,
278 const gfx::Vector2d& v, 281 const gfx::Vector2d& v,
279 base::trace_event::TracedValue* res); 282 base::trace_event::TracedValue* res);
280 static void AddToTracedValue(const char* name, 283 static void AddToTracedValue(const char* name,
281 const gfx::Vector2dF& v, 284 const gfx::Vector2dF& v,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 template <typename T> 319 template <typename T>
317 static T RoundDownInternal(T n, T mul) { 320 static T RoundDownInternal(T n, T mul) {
318 return (n > 0) ? (n / mul) * mul : (n == 0) ? 0 321 return (n > 0) ? (n / mul) * mul : (n == 0) ? 0
319 : ((n - mul + 1) / mul) * mul; 322 : ((n - mul + 1) / mul) * mul;
320 } 323 }
321 }; 324 };
322 325
323 } // namespace cc 326 } // namespace cc
324 327
325 #endif // CC_BASE_MATH_UTIL_H_ 328 #endif // CC_BASE_MATH_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698