summaryrefslogtreecommitdiffstats
path: root/ui/gfx/rect_base.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-30 21:49:42 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-30 21:49:42 +0000
commit7057d217f6feb62f0bfdeb6ffd9d50378d10e3f3 (patch)
tree5580b8ee0a0bdbda214735288fb7715ee36ad6e4 /ui/gfx/rect_base.h
parent8969bb3fd9b192878606fc3da886db7128153226 (diff)
downloadchromium_src-7057d217f6feb62f0bfdeb6ffd9d50378d10e3f3.zip
chromium_src-7057d217f6feb62f0bfdeb6ffd9d50378d10e3f3.tar.gz
chromium_src-7057d217f6feb62f0bfdeb6ffd9d50378d10e3f3.tar.bz2
gfx: Inline the constructors and destructors for RectBase.
This gives a 5% increase in cc_perftests. Before: *RESULT SevenTabSwitcher: frames= 1519.00 runs/s *RESULT 10_10_layer_tree: frames= 541.09 runs/s After: *RESULT SevenTabSwitcher: frames= 1594.62 runs/s *RESULT 10_10_layer_tree: frames= 569.31 runs/s BUG=163035 R=jamesr,sky Review URL: https://chromiumcodereview.appspot.com/11414265 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/rect_base.h')
-rw-r--r--ui/gfx/rect_base.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/gfx/rect_base.h b/ui/gfx/rect_base.h
index 1be30400..8ae2a64 100644
--- a/ui/gfx/rect_base.h
+++ b/ui/gfx/rect_base.h
@@ -145,12 +145,15 @@ class UI_EXPORT RectBase {
bool SharesEdgeWith(const Class& rect) const;
protected:
- RectBase(const PointClass& origin, const SizeClass& size);
- explicit RectBase(const SizeClass& size);
- explicit RectBase(const PointClass& origin);
+ RectBase(const PointClass& origin, const SizeClass& size)
+ : origin_(origin), size_(size) {}
+ explicit RectBase(const SizeClass& size)
+ : size_(size) {}
+ explicit RectBase(const PointClass& origin)
+ : origin_(origin) {}
// Destructor is intentionally made non virtual and protected.
// Do not make this public.
- ~RectBase();
+ ~RectBase() {}
private:
PointClass origin_;