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

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

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-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 12 matching lines...) Expand all
23 class Value; 23 class Value;
24 namespace trace_event { 24 namespace trace_event {
25 class TracedValue; 25 class TracedValue;
26 } 26 }
27 } // namespace base 27 } // namespace base
28 28
29 namespace gfx { 29 namespace gfx {
30 class QuadF; 30 class QuadF;
31 class Rect; 31 class Rect;
32 class RectF; 32 class RectF;
33 class SizeF;
33 class Transform; 34 class Transform;
34 class Vector2dF; 35 class Vector2dF;
35 class Vector2d; 36 class Vector2d;
36 class Vector3dF; 37 class Vector3dF;
37 } 38 }
38 39
39 namespace cc { 40 namespace cc {
40 41
41 struct HomogeneousCoordinate { 42 struct HomogeneousCoordinate {
42 HomogeneousCoordinate(SkMScalar x, SkMScalar y, SkMScalar z, SkMScalar w) { 43 HomogeneousCoordinate(SkMScalar x, SkMScalar y, SkMScalar z, SkMScalar w) {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 template <typename T> 316 template <typename T>
316 static T RoundDownInternal(T n, T mul) { 317 static T RoundDownInternal(T n, T mul) {
317 return (n > 0) ? (n / mul) * mul : (n == 0) ? 0 318 return (n > 0) ? (n / mul) * mul : (n == 0) ? 0
318 : ((n - mul + 1) / mul) * mul; 319 : ((n - mul + 1) / mul) * mul;
319 } 320 }
320 }; 321 };
321 322
322 } // namespace cc 323 } // namespace cc
323 324
324 #endif // CC_BASE_MATH_UTIL_H_ 325 #endif // CC_BASE_MATH_UTIL_H_
OLDNEW
« no previous file with comments | « ash/touch/touch_transformer_controller.cc ('k') | cc/blink/web_layer_impl_fixed_bounds_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698