[#7] Pass gfx::Size by const ref.

Any struct of size > 4 bytes should be passed by const ref. 
Passing by ref for these structs is faster than passing by value,
especially when invoking function has multiple parameters and some
other scenarios mentioned in the bug.

BUG=159273

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247426

Review URL: https://codereview.chromium.org/145313006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247769 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 9063caf6..146c0e03 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1899,7 +1899,7 @@
   client_->SetNeedsCommitOnImplThread();
 }
 
-void LayerTreeHostImpl::SetViewportSize(gfx::Size device_viewport_size) {
+void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) {
   if (device_viewport_size == device_viewport_size_)
     return;
 
@@ -1925,7 +1925,7 @@
 
 void LayerTreeHostImpl::SetOverhangUIResource(
     UIResourceId overhang_ui_resource_id,
-    gfx::Size overhang_ui_resource_size) {
+    const gfx::Size& overhang_ui_resource_size) {
   overhang_ui_resource_id_ = overhang_ui_resource_id;
   overhang_ui_resource_size_ = overhang_ui_resource_size;
 }