diff options
author | danakj <danakj@chromium.org> | 2015-09-25 12:38:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-25 19:39:49 +0000 |
commit | ddaec91ec046e8a389d16049c0a2656a4e41a2ad (patch) | |
tree | ae2d490de25a87631a75962d2b70d93f7b64f7a8 /cc/base | |
parent | a0ea3c2db857d5821b63a52e3bd5704cec218f84 (diff) | |
download | chromium_src-ddaec91ec046e8a389d16049c0a2656a4e41a2ad.zip chromium_src-ddaec91ec046e8a389d16049c0a2656a4e41a2ad.tar.gz chromium_src-ddaec91ec046e8a389d16049c0a2656a4e41a2ad.tar.bz2 |
gfx: Make conversions from Size to SizeF be explicit.
This removes the implicit operator from Size to SizeF and adds an
explicit constructor instead.
There are many places in the code that want to do:
an_integer_size = ToFlooredSize(ScaleSize(an_integer_size, x));
This would make these all look like
an_integer_size = ToFlooredSize(ScaleSize(gfx::RectF(an_integer_size), x));
But that's pretty verbose. So add helpers similar to those we have
already for gfx::Rect, for when you want to scale a Size to a Size,
such as
an_integer_size = ScaleToFlooredSize(an_integer_size, x);
R=sky@chromium.org, vmpstr
BUG=342848
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1357423009
Cr-Commit-Position: refs/heads/master@{#350889}
Diffstat (limited to 'cc/base')
-rw-r--r-- | cc/base/math_util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/base/math_util.h b/cc/base/math_util.h index 6512bb4..a83ab4f 100644 --- a/cc/base/math_util.h +++ b/cc/base/math_util.h @@ -30,6 +30,7 @@ namespace gfx { class QuadF; class Rect; class RectF; +class SizeF; class Transform; class Vector2dF; class Vector2d; |