Pass gfx::Rect and gfx::RectF by const ref.
commit0023fc78d056556b353ee17f03760bec8c1fee49
authorprashant.n@samsung.com <prashant.n@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 10 Jan 2014 20:05:06 +0000 (10 20:05 +0000)
committerprashant.n@samsung.com <prashant.n@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 10 Jan 2014 20:05:06 +0000 (10 20:05 +0000)
tree009367358a1c44b08f3142f63b087d936206ba44
parent37df32bd517577ac6ad20c6d76b236265caeacaf
Pass gfx::Rect and gfx::RectF by const ref.

Avoid unneccessary copy of structures gfx::Rect & gfx::RectF
by passing them by const ref rather than value.

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.

Pass by value creates unneccessary overhead which should be avoided.

BUG=159273

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244224 0039d316-1c4b-4281-b951-d872f2087c98
201 files changed:
cc/base/invalidation_region.cc
cc/base/invalidation_region.h
cc/base/math_util.cc
cc/base/math_util.h
cc/base/region.cc
cc/base/region.h
cc/base/tiling_data.cc
cc/base/tiling_data.h
cc/debug/debug_rect_history.h
cc/debug/overdraw_metrics.cc
cc/debug/overdraw_metrics.h
cc/input/scrollbar.h
cc/layers/content_layer.cc
cc/layers/content_layer.h
cc/layers/content_layer_client.h
cc/layers/content_layer_unittest.cc
cc/layers/delegated_frame_provider_unittest.cc
cc/layers/delegated_renderer_layer_impl.cc
cc/layers/delegated_renderer_layer_impl.h
cc/layers/layer_perftest.cc
cc/layers/layer_unittest.cc
cc/layers/nine_patch_layer.cc
cc/layers/nine_patch_layer.h
cc/layers/nine_patch_layer_impl.cc
cc/layers/nine_patch_layer_impl.h
cc/layers/nine_patch_layer_impl_unittest.cc
cc/layers/painted_scrollbar_layer.cc
cc/layers/painted_scrollbar_layer.h
cc/layers/picture_image_layer.cc
cc/layers/picture_image_layer.h
cc/layers/picture_layer_impl.cc
cc/layers/picture_layer_impl.h
cc/layers/picture_layer_unittest.cc
cc/layers/render_surface.h
cc/layers/render_surface_impl.cc
cc/layers/render_surface_impl.h
cc/layers/scrollbar_layer_impl_base.cc
cc/layers/scrollbar_layer_impl_base.h
cc/layers/scrollbar_theme_painter.h
cc/layers/tiled_layer.cc
cc/layers/tiled_layer.h
cc/layers/tiled_layer_impl.cc
cc/layers/tiled_layer_impl.h
cc/layers/tiled_layer_impl_unittest.cc
cc/layers/tiled_layer_unittest.cc
cc/layers/ui_resource_layer_impl_unittest.cc
cc/output/copy_output_request.h
cc/output/delegating_renderer.cc
cc/output/delegating_renderer.h
cc/output/direct_renderer.cc
cc/output/direct_renderer.h
cc/output/gl_renderer.cc
cc/output/gl_renderer.h
cc/output/gl_renderer_unittest.cc
cc/output/output_surface.cc
cc/output/output_surface.h
cc/output/output_surface_client.h
cc/output/renderer.h
cc/output/renderer_pixeltest.cc
cc/output/software_output_device.cc
cc/output/software_output_device.h
cc/output/software_renderer.cc
cc/output/software_renderer.h
cc/quads/checkerboard_draw_quad.cc
cc/quads/checkerboard_draw_quad.h
cc/quads/content_draw_quad_base.cc
cc/quads/content_draw_quad_base.h
cc/quads/debug_border_draw_quad.cc
cc/quads/debug_border_draw_quad.h
cc/quads/draw_quad.cc
cc/quads/draw_quad.h
cc/quads/io_surface_draw_quad.cc
cc/quads/io_surface_draw_quad.h
cc/quads/picture_draw_quad.cc
cc/quads/picture_draw_quad.h
cc/quads/render_pass.cc
cc/quads/render_pass.h
cc/quads/render_pass_draw_quad.cc
cc/quads/render_pass_draw_quad.h
cc/quads/shared_quad_state.cc
cc/quads/shared_quad_state.h
cc/quads/solid_color_draw_quad.cc
cc/quads/solid_color_draw_quad.h
cc/quads/stream_video_draw_quad.cc
cc/quads/stream_video_draw_quad.h
cc/quads/texture_draw_quad.cc
cc/quads/texture_draw_quad.h
cc/quads/tile_draw_quad.cc
cc/quads/tile_draw_quad.h
cc/quads/yuv_video_draw_quad.cc
cc/quads/yuv_video_draw_quad.h
cc/resources/bitmap_content_layer_updater.cc
cc/resources/bitmap_content_layer_updater.h
cc/resources/bitmap_skpicture_content_layer_updater.cc
cc/resources/bitmap_skpicture_content_layer_updater.h
cc/resources/image_layer_updater.cc
cc/resources/image_layer_updater.h
cc/resources/layer_painter.h
cc/resources/layer_tiling_data.cc
cc/resources/layer_tiling_data.h
cc/resources/layer_updater.h
cc/resources/picture.cc
cc/resources/picture.h
cc/resources/picture_layer_tiling.cc
cc/resources/picture_layer_tiling.h
cc/resources/picture_layer_tiling_set.cc
cc/resources/picture_layer_tiling_set.h
cc/resources/picture_layer_tiling_unittest.cc
cc/resources/picture_pile.cc
cc/resources/picture_pile.h
cc/resources/picture_pile_base.cc
cc/resources/picture_pile_base.h
cc/resources/picture_pile_impl.cc
cc/resources/picture_pile_impl.h
cc/resources/prioritized_resource.cc
cc/resources/prioritized_resource.h
cc/resources/priority_calculator.cc
cc/resources/priority_calculator.h
cc/resources/raster_worker_pool.cc
cc/resources/raster_worker_pool.h
cc/resources/resource_provider.cc
cc/resources/resource_provider.h
cc/resources/resource_update.cc
cc/resources/resource_update.h
cc/resources/skpicture_content_layer_updater.cc
cc/resources/skpicture_content_layer_updater.h
cc/resources/tile.cc
cc/resources/tile.h
cc/resources/tile_manager.cc
cc/resources/tile_manager.h
cc/scheduler/texture_uploader.cc
cc/scheduler/texture_uploader.h
cc/test/fake_content_layer_client.cc
cc/test/fake_content_layer_client.h
cc/test/fake_layer_tree_host_impl_client.h
cc/test/fake_output_surface_client.h
cc/test/fake_picture_layer_tiling_client.cc
cc/test/fake_picture_layer_tiling_client.h
cc/test/fake_proxy.cc
cc/test/fake_proxy.h
cc/test/fake_scrollbar.cc
cc/test/fake_scrollbar.h
cc/test/layer_test_common.cc
cc/test/layer_test_common.h
cc/test/layer_tree_pixel_test.cc
cc/test/layer_tree_pixel_test.h
cc/test/layer_tree_test.cc
cc/test/layer_tree_test.h
cc/test/occlusion_tracker_test_common.h
cc/test/pixel_test.cc
cc/test/pixel_test.h
cc/test/render_pass_test_utils.cc
cc/test/render_pass_test_utils.h
cc/test/skia_common.cc
cc/test/skia_common.h
cc/test/solid_color_content_layer_client.cc
cc/test/solid_color_content_layer_client.h
cc/test/test_context_support.cc
cc/test/test_context_support.h
cc/test/tiled_layer_test_common.cc
cc/test/tiled_layer_test_common.h
cc/trees/damage_tracker.cc
cc/trees/damage_tracker.h
cc/trees/layer_tree_host.cc
cc/trees/layer_tree_host.h
cc/trees/layer_tree_host_common.cc
cc/trees/layer_tree_host_common.h
cc/trees/layer_tree_host_common_unittest.cc
cc/trees/layer_tree_host_impl.cc
cc/trees/layer_tree_host_impl.h
cc/trees/layer_tree_host_impl_unittest.cc
cc/trees/layer_tree_host_pixeltest_masks.cc
cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
cc/trees/layer_tree_host_unittest.cc
cc/trees/layer_tree_host_unittest_delegated.cc
cc/trees/occlusion_tracker.cc
cc/trees/occlusion_tracker.h
cc/trees/occlusion_tracker_unittest.cc
cc/trees/proxy.h
cc/trees/quad_culler.cc
cc/trees/quad_culler_unittest.cc
cc/trees/single_thread_proxy.cc
cc/trees/single_thread_proxy.h
cc/trees/thread_proxy.cc
cc/trees/thread_proxy.h
content/browser/android/in_process/synchronous_compositor_output_surface.cc
content/browser/aura/software_output_device_ozone.cc
content/browser/aura/software_output_device_ozone.h
content/browser/aura/software_output_device_win.cc
content/browser/aura/software_output_device_win.h
content/renderer/gpu/compositor_software_output_device.cc
content/renderer/gpu/compositor_software_output_device.h
gpu/command_buffer/client/context_support.h
gpu/command_buffer/client/gles2_implementation.cc
gpu/command_buffer/client/gles2_implementation.h
ui/compositor/layer.cc
ui/compositor/layer.h
webkit/renderer/compositor_bindings/scrollbar_impl.cc
webkit/renderer/compositor_bindings/scrollbar_impl.h
webkit/renderer/compositor_bindings/web_content_layer_impl.cc
webkit/renderer/compositor_bindings/web_content_layer_impl.h