| Index: ui/gfx/geometry/size_f.h
|
| diff --git a/ui/gfx/geometry/size_f.h b/ui/gfx/geometry/size_f.h
|
| index 66080f09c12d660c78bcab789e5e6caaeb38597e..2ee2f51973c635e96ad0236067d5ae9fedb88482 100644
|
| --- a/ui/gfx/geometry/size_f.h
|
| +++ b/ui/gfx/geometry/size_f.h
|
| @@ -10,6 +10,7 @@
|
| #include <string>
|
|
|
| #include "base/compiler_specific.h"
|
| +#include "ui/gfx/geometry/size.h"
|
| #include "ui/gfx/gfx_export.h"
|
|
|
| namespace gfx {
|
| @@ -22,6 +23,10 @@ class GFX_EXPORT SizeF {
|
| : width_(fmaxf(0, width)), height_(fmaxf(0, height)) {}
|
| ~SizeF() {}
|
|
|
| + explicit SizeF(const Size& size)
|
| + : SizeF(static_cast<float>(size.width()),
|
| + static_cast<float>(size.height())) {}
|
| +
|
| float width() const { return width_; }
|
| float height() const { return height_; }
|
|
|
|
|