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

Issue 139233002: [#4] Pass gfx structs by const ref (gfx::PointF) (Closed)

Created:
6 years, 11 months ago by r.kasibhatla
Modified:
6 years, 11 months ago
Reviewers:
danakj, enne (OOO), piman
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[#4] Pass gfx structs by const ref (gfx::PointF) Avoid unneccessary copy of structures gfx::PointF 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 R=danakj, enne, piman Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245467

Patch Set 1 #

Total comments: 12

Patch Set 2 : Corrected as per review comments! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -88 lines) Patch
M cc/base/math_util.h View 1 4 chunks +4 lines, -4 lines 0 comments Download
M cc/base/math_util.cc View 1 6 chunks +9 lines, -8 lines 0 comments Download
M cc/debug/overdraw_metrics.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M cc/layers/layer.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/layers/layer.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/layers/layer_impl.h View 3 chunks +3 lines, -3 lines 0 comments Download
M cc/layers/layer_impl.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M cc/layers/layer_position_constraint_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/layers/texture_layer.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/texture_layer.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/layers/texture_layer_impl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/layers/ui_resource_layer.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/ui_resource_layer.cc View 1 chunk +2 lines, -1 line 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 +2 lines, -2 lines 0 comments Download
M cc/quads/texture_draw_quad.h View 2 chunks +4 lines, -4 lines 0 comments Download
M cc/quads/texture_draw_quad.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M cc/resources/layer_quad.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/layer_quad.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_sorter.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_sorter.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_host_common.h View 1 chunk +5 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_common.cc View 6 chunks +8 lines, -7 lines 0 comments Download
M cc/trees/layer_tree_host_common_unittest.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 3 chunks +4 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 4 chunks +5 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 chunk +2 lines, -2 lines 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_unittest.cc View 8 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
r.kasibhatla
PTAL.
6 years, 11 months ago (2014-01-15 08:19:59 UTC) #1
danakj
LGTM but please remove the unrelated changes in math util https://codereview.chromium.org/139233002/diff/1/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/139233002/diff/1/cc/base/math_util.cc#newcode98 ...
6 years, 11 months ago (2014-01-15 16:54:45 UTC) #2
r.kasibhatla
https://codereview.chromium.org/139233002/diff/1/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/139233002/diff/1/cc/base/math_util.cc#newcode98 cc/base/math_util.cc:98: gfx::PointF (&clipped_quad)[8], On 2014/01/15 16:54:46, danakj wrote: > This ...
6 years, 11 months ago (2014-01-16 05:05:39 UTC) #3
danakj
https://codereview.chromium.org/139233002/diff/1/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/139233002/diff/1/cc/base/math_util.cc#newcode226 cc/base/math_util.cc:226: gfx::RectF MathUtil::ComputeEnclosingRectOfVertices(const gfx::PointF* vertices, On 2014/01/16 05:05:39, r.kasibhatla wrote: ...
6 years, 11 months ago (2014-01-16 17:46:11 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/r.kasibhatla@samsung.com/139233002/50002
6 years, 11 months ago (2014-01-17 03:54:56 UTC) #5
commit-bot: I haz the power
6 years, 11 months ago (2014-01-17 07:26:50 UTC) #6
Message was sent while issue was closed.
Change committed as 245467

Powered by Google App Engine
This is Rietveld 408576698