Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed)

Created:
6 years, 11 months ago by prashant.n
Modified:
6 years, 9 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, RaviKasibhatla, Berwal
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[#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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247769

Patch Set 1 #

Patch Set 2 : Rebase to TOT and fixed build errors on other platforms #

Total comments: 3

Patch Set 3 : Fixed build break #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+316 lines, -304 lines) Patch
M cc/base/math_util.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/base/math_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/base/tiling_data.h View 1 chunk +6 lines, -6 lines 0 comments Download
M cc/base/tiling_data.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M cc/base/tiling_data_unittest.cc View 11 chunks +22 lines, -22 lines 0 comments Download
M cc/layers/delegated_renderer_layer.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/delegated_renderer_layer.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/delegated_renderer_layer_impl.h View 2 chunks +4 lines, -4 lines 0 comments Download
M cc/layers/delegated_renderer_layer_impl.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M cc/layers/heads_up_display_layer.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/heads_up_display_layer.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/io_surface_layer.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/io_surface_layer.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/io_surface_layer_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/io_surface_layer_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/layer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/layer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/layer_impl.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M cc/layers/layer_impl.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M cc/layers/layer_position_constraint_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/nine_patch_layer_impl_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/layers/picture_layer_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M cc/layers/scrollbar_layer_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/tiled_layer.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/tiled_layer.cc View 1 chunk +3 lines, -1 line 0 comments Download
M cc/layers/tiled_layer_impl_unittest.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M cc/layers/ui_resource_layer_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/ui_resource_layer_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/ui_resource_layer_impl_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/output/copy_output_request.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/copy_output_request.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/copy_output_result.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/output/copy_output_result.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/direct_renderer.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/direct_renderer.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/gl_renderer.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/gl_renderer.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/gl_renderer_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M cc/output/output_surface.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/output_surface.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/shader.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/shader.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/software_output_device.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/output/software_output_device.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/quads/content_draw_quad_base.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/quads/content_draw_quad_base.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/quads/io_surface_draw_quad.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M cc/quads/io_surface_draw_quad.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/quads/picture_draw_quad.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/quads/picture_draw_quad.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/quads/shared_quad_state.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/quads/shared_quad_state.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/quads/tile_draw_quad.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/quads/tile_draw_quad.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/resources/bitmap_content_layer_updater.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/bitmap_content_layer_updater.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/layer_tiling_data.h View 4 chunks +4 lines, -4 lines 0 comments Download
M cc/resources/layer_tiling_data.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M cc/resources/layer_updater.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/picture_layer_tiling.h View 4 chunks +7 lines, -7 lines 0 comments Download
M cc/resources/picture_layer_tiling.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M cc/resources/picture_layer_tiling_set.h View 3 chunks +5 lines, -5 lines 0 comments Download
M cc/resources/picture_layer_tiling_set.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M cc/resources/picture_layer_tiling_set_unittest.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M cc/resources/picture_layer_tiling_unittest.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M cc/resources/picture_pile_base.h View 2 chunks +3 lines, -3 lines 0 comments Download
M cc/resources/picture_pile_base.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M cc/resources/prioritized_resource.h View 4 chunks +4 lines, -4 lines 0 comments Download
M cc/resources/prioritized_resource.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M cc/resources/prioritized_resource_manager.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/resources/prioritized_resource_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/raster_worker_pool.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/resource.h View 2 chunks +4 lines, -3 lines 0 comments Download
M cc/resources/resource_pool.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/resource_pool.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/resources/resource_provider.h View 1 3 chunks +6 lines, -6 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 6 chunks +6 lines, -6 lines 0 comments Download
M cc/resources/resource_provider_unittest.cc View 6 chunks +8 lines, -6 lines 0 comments Download
M cc/resources/scoped_resource.h View 1 chunk +4 lines, -2 lines 0 comments Download
M cc/resources/scoped_resource.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/resources/shared_bitmap_manager.h View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/resources/skpicture_content_layer_updater.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/skpicture_content_layer_updater.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/texture_mailbox.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/texture_mailbox.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/tile.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/tile.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/tile_manager.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/tile_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/tile_manager_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/video_resource_updater.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/video_resource_updater.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/scheduler/texture_uploader.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/scheduler/texture_uploader.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/scheduler/texture_uploader_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/fake_picture_layer_impl.h View 2 chunks +3 lines, -2 lines 0 comments Download
M cc/test/fake_picture_layer_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/fake_picture_layer_tiling_client.h View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/test/fake_picture_layer_tiling_client.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/test/fake_picture_pile_impl.h View 1 chunk +6 lines, -6 lines 0 comments Download
M cc/test/fake_picture_pile_impl.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M cc/test/layer_tree_pixel_test.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/layer_tree_pixel_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/pixel_test.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/pixel_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/pixel_test_output_surface.h View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/test/pixel_test_output_surface.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/test/pixel_test_software_output_device.h View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/test/pixel_test_software_output_device.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/skia_common.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/skia_common.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/test_texture.h View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/test/test_texture.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/test/tiled_layer_test_common.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/test/tiled_layer_test_common.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_common.h View 5 chunks +6 lines, -6 lines 0 comments Download
M cc/trees/layer_tree_host_common_unittest.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 4 chunks +5 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest_occlusion.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/occlusion_tracker.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/occlusion_tracker_unittest.cc View 9 chunks +10 lines, -10 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_output_surface.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/android/in_process/synchronous_compositor_output_surface.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/compositor/browser_compositor_output_surface.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/compositor/browser_compositor_output_surface.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/compositor/software_output_device_win.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/compositor/software_output_device_win.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/gpu/compositor_software_output_device.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/gpu/compositor_software_output_device.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/gpu/mailbox_output_surface.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/gpu/mailbox_output_surface.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 19 (0 generated)
prashant.n
PTAL.
6 years, 11 months ago (2014-01-24 14:54:14 UTC) #1
danakj
Some compile issues to sort out still
6 years, 11 months ago (2014-01-24 16:20:51 UTC) #2
prashant.n
+ bulach@ for content/browser/android/in_process/synchronous_compositor_output_surface.h. & .cc + piman@ for content/browser/compositor/browser_compositor_output_surface.h & .cc content/browser/compositor/software_output_device_win.h & .cc ...
6 years, 11 months ago (2014-01-27 08:50:13 UTC) #3
danakj
LGTM
6 years, 10 months ago (2014-01-27 18:07:56 UTC) #4
piman
lgtm
6 years, 10 months ago (2014-01-27 18:57:04 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/prashant.n@samsung.com/145313006/410001
6 years, 10 months ago (2014-01-28 04:01:20 UTC) #6
commit-bot: I haz the power
Change committed as 247426
6 years, 10 months ago (2014-01-28 06:37:20 UTC) #7
Adam Rice
A revert of this CL has been created in https://codereview.chromium.org/142863008/ by ricea@chromium.org. The reason for ...
6 years, 10 months ago (2014-01-28 08:34:55 UTC) #8
Adam Rice
https://codereview.chromium.org/145313006/diff/410001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/145313006/diff/410001/cc/resources/video_resource_updater.h#newcode101 cc/resources/video_resource_updater.h:101: const gfx::Size& resource_size; This object gets stored inside a ...
6 years, 10 months ago (2014-01-28 09:41:30 UTC) #9
r.kasibhatla
https://codereview.chromium.org/145313006/diff/410001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/145313006/diff/410001/cc/resources/video_resource_updater.h#newcode101 cc/resources/video_resource_updater.h:101: const gfx::Size& resource_size; On 2014/01/28 09:41:31, Adam Rice wrote: ...
6 years, 10 months ago (2014-01-28 09:54:58 UTC) #10
prashant.n
Fixed build break found by Adam. Thanks Adam. https://codereview.chromium.org/145313006/diff/410001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/145313006/diff/410001/cc/resources/video_resource_updater.h#newcode101 cc/resources/video_resource_updater.h:101: const ...
6 years, 10 months ago (2014-01-28 10:33:39 UTC) #11
prashant.n
Please review CL https://codereview.chromium.org/147603006/ as current CL is reverted due to build break.
6 years, 10 months ago (2014-01-28 15:05:36 UTC) #12
prashant.n
PTAL Patch 3 is for fixing build error Adam pointed out. Patch 4 is for ...
6 years, 10 months ago (2014-01-29 11:12:07 UTC) #13
danakj
LGTM, thanks.
6 years, 10 months ago (2014-01-29 18:35:30 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/prashant.n@samsung.com/145313006/550001
6 years, 10 months ago (2014-01-29 18:35:54 UTC) #15
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) remoting_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=218067
6 years, 10 months ago (2014-01-29 19:08:03 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/prashant.n@samsung.com/145313006/550001
6 years, 10 months ago (2014-01-29 19:12:19 UTC) #17
commit-bot: I haz the power
Change committed as 247769
6 years, 10 months ago (2014-01-29 22:58:46 UTC) #18
eddiejwilliams2014
6 years, 8 months ago (2014-04-24 04:22:52 UTC) #19
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/255553003/ by eddiejwilliams2014@gmail.com.

The reason for reverting is: K.

Powered by Google App Engine
This is Rietveld 408576698