diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-30 03:34:37 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-30 03:34:37 +0000 |
commit | 7e830a9541a0b76e5c929ad8b64dbf0620b58e00 (patch) | |
tree | bc75e35877859df8ee6bd3360b65e12cc2359efc /ui/gfx/point_f.h | |
parent | 8f9f3408ebc699966ffed35dd37392f75911b3ee (diff) | |
download | chromium_src-7e830a9541a0b76e5c929ad8b64dbf0620b58e00.zip chromium_src-7e830a9541a0b76e5c929ad8b64dbf0620b58e00.tar.gz chromium_src-7e830a9541a0b76e5c929ad8b64dbf0620b58e00.tar.bz2 |
Inline hot ctor/dtors for struct-like gfx:: geometry types
This inlines the ctors and (empty) dtors for gfx::PointF, SizeF and RectF. On
a ToT chromium mac release build, inlining these is a 8.5% speedup on cc_perftests.
Based on profiling data from instruments inlining QuadF would be a speedup as well,
but the chromium-style plugin thinks it's too complex (even though the dtor has no
code).
BUG=
NOTRY=true (yoda style)
Review URL: https://chromiumcodereview.appspot.com/11428076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170378 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/point_f.h')
-rw-r--r-- | ui/gfx/point_f.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/gfx/point_f.h b/ui/gfx/point_f.h index 7a828be..a7b841f 100644 --- a/ui/gfx/point_f.h +++ b/ui/gfx/point_f.h @@ -16,9 +16,9 @@ namespace gfx { // A floating version of gfx::Point. class UI_EXPORT PointF : public PointBase<PointF, float, Vector2dF> { public: - PointF(); - PointF(float x, float y); - ~PointF(); + PointF() : PointBase<PointF, float, Vector2dF>(0, 0) {} + PointF(float x, float y) : PointBase<PointF, float, Vector2dF>(x, y) {} + ~PointF() {} void Scale(float scale) { Scale(scale, scale); |