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

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed)

Created:
8 years, 1 month ago by danakj
Modified:
8 years, 1 month ago
Reviewers:
enne (OOO)
CC:
chromium-reviews, feature-media-reviews_chromium.org, cc-bugs_chromium.org, darin-cc_chromium.org, piman, backer, tfarina
Visibility:
Public.

Description

cc: Use gfx:: Geometry types for positions, bounds, and related things. This covers layers, layer tree hosts, and related classes. *phew* I intentionally avoided anything to do with scrolling or page scale. Those should be changed to be Vectors and need a bit more thought. This change should be pretty mindless. It converts to gfx Rect, Size, Vector, and Point classes. No change is made for FloatPoint3D or FloatQuad yet. I've added cc/geometry.h as a place for free functions that don't exist on gfx types yet, and that we should port over in the future. No change in behaviour; covered by existing tests. BUG=147395 R=enne Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=165434

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : some missed intstuff #

Total comments: 5

Patch Set 4 : uint8 #

Patch Set 5 : rebase-bounds #

Patch Set 6 : rebase-bounds2 #

Patch Set 7 : rebase-woot #

Patch Set 8 : rebased-examined #

Patch Set 9 : addbackgeometry.h #

Patch Set 10 : rebaseOnCS #

Patch Set 11 : typo #

Patch Set 12 : rebaseagain #

Total comments: 2

Patch Set 13 : RebaseAndSolveTODOs #

Total comments: 2

Patch Set 14 : Fix FloatToSkScalar when wtf/MathUtils.h is gone #

Patch Set 15 : ScaleAsVector #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2581 lines, -2508 lines) Patch
M cc/cc.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M cc/contents_scaling_layer.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M cc/contents_scaling_layer.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -3 lines 0 comments Download
M cc/contents_scaling_layer_unittest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +7 lines, -7 lines 0 comments Download
M cc/damage_tracker.h View 4 2 chunks +19 lines, -15 lines 0 comments Download
M cc/damage_tracker.cc View 1 2 3 4 5 6 7 8 9 12 chunks +49 lines, -50 lines 0 comments Download
M cc/damage_tracker_unittest.cc View 4 57 chunks +215 lines, -220 lines 0 comments Download
M cc/debug_rect_history.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M cc/debug_rect_history.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -5 lines 0 comments Download
M cc/delegated_renderer_layer_impl_unittest.cc View 1 2 3 4 11 chunks +44 lines, -44 lines 0 comments Download
M cc/draw_quad_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M cc/font_atlas.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -5 lines 0 comments Download
M cc/font_atlas.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -4 lines 0 comments Download
A cc/geometry.h View 1 2 3 4 5 6 7 8 1 chunk +21 lines, -0 lines 0 comments Download
M cc/gl_renderer.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M cc/gl_renderer.cc View 1 2 3 4 5 6 6 chunks +13 lines, -13 lines 0 comments Download
M cc/gl_renderer_unittest.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M cc/heads_up_display_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M cc/image_layer.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M cc/image_layer.cc View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -5 lines 0 comments Download
M cc/io_surface_layer_impl.h View 4 3 chunks +3 lines, -3 lines 0 comments Download
M cc/io_surface_layer_impl.cc View 4 2 chunks +2 lines, -2 lines 0 comments Download
M cc/layer.h View 1 2 3 4 5 6 7 8 9 12 chunks +22 lines, -21 lines 0 comments Download
M cc/layer.cc View 1 2 3 4 5 6 7 8 9 10 chunks +16 lines, -17 lines 0 comments Download
M cc/layer_impl.h View 1 2 3 4 5 6 7 8 9 11 chunks +24 lines, -24 lines 0 comments Download
M cc/layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 chunks +15 lines, -15 lines 0 comments Download
M cc/layer_iterator_unittest.cc View 4 2 chunks +4 lines, -4 lines 0 comments Download
M cc/layer_quad.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M cc/layer_quad.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M cc/layer_sorter.h View 4 2 chunks +4 lines, -3 lines 0 comments Download
M cc/layer_sorter.cc View 1 2 3 4 6 chunks +19 lines, -15 lines 0 comments Download
M cc/layer_tiling_data.h View 4 4 chunks +18 lines, -14 lines 0 comments Download
M cc/layer_tiling_data.cc View 1 2 3 4 5 chunks +24 lines, -24 lines 0 comments Download
M cc/layer_tree_host.h View 1 2 3 4 5 6 7 chunks +11 lines, -10 lines 0 comments Download
M cc/layer_tree_host.cc View 1 2 3 4 5 6 7 chunks +13 lines, -13 lines 0 comments Download
M cc/layer_tree_host_common.h View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M cc/layer_tree_host_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 29 chunks +72 lines, -79 lines 0 comments Download
M cc/layer_tree_host_common_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 119 chunks +487 lines, -487 lines 0 comments Download
M cc/layer_tree_host_impl.h View 1 2 3 4 7 chunks +10 lines, -10 lines 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 15 chunks +32 lines, -33 lines 0 comments Download
M cc/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 102 chunks +331 lines, -334 lines 0 comments Download
M cc/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 29 chunks +119 lines, -117 lines 0 comments Download
M cc/layer_unittest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +18 lines, -18 lines 0 comments Download
M cc/math_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +19 lines, -15 lines 0 comments Download
M cc/math_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 chunks +31 lines, -29 lines 0 comments Download
M cc/math_util_unittest.cc View 4 3 chunks +13 lines, -12 lines 0 comments Download
M cc/occlusion_tracker.cc View 1 2 3 4 5 chunks +6 lines, -6 lines 0 comments Download
M cc/occlusion_tracker_unittest.cc View 1 2 3 4 64 chunks +198 lines, -198 lines 0 comments Download
M cc/overdraw_metrics.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M cc/priority_calculator.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -3 lines 0 comments Download
M cc/priority_calculator.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M cc/proxy.h View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M cc/quad_culler_unittest.cc View 1 2 4 21 chunks +71 lines, -71 lines 0 comments Download
M cc/render_pass.cc View 4 2 chunks +2 lines, -2 lines 0 comments Download
M cc/render_surface.h View 4 5 chunks +9 lines, -9 lines 0 comments Download
M cc/render_surface.cc View 4 1 chunk +3 lines, -3 lines 0 comments Download
M cc/render_surface_impl.h View 4 5 chunks +10 lines, -10 lines 0 comments Download
M cc/render_surface_impl.cc View 1 2 3 4 5 6 7 8 9 8 chunks +17 lines, -15 lines 0 comments Download
M cc/renderer.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M cc/scoped_texture.h View 4 1 chunk +1 line, -1 line 0 comments Download
M cc/scoped_texture.cc View 4 1 chunk +2 lines, -2 lines 0 comments Download
M cc/scrollbar_animation_controller.h View 4 3 chunks +7 lines, -3 lines 0 comments Download
M cc/scrollbar_animation_controller.cc View 4 1 chunk +2 lines, -2 lines 0 comments Download
M cc/scrollbar_layer.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M cc/scrollbar_layer.cc View 1 2 3 4 5 6 7 8 9 5 chunks +12 lines, -12 lines 0 comments Download
M cc/scrollbar_layer_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -8 lines 0 comments Download
M cc/single_thread_proxy.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M cc/single_thread_proxy.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M cc/software_renderer.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M cc/software_renderer.cc View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M cc/software_renderer_unittest.cc View 4 5 6 4 chunks +15 lines, -15 lines 0 comments Download
M cc/stubs/float_point_3d.h View 4 1 chunk +6 lines, -0 lines 0 comments Download
M cc/stubs/float_size.h View 4 1 chunk +5 lines, -0 lines 0 comments Download
M cc/stubs/int_point.h View 4 1 chunk +4 lines, -0 lines 0 comments Download
M cc/stubs/skia_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +13 lines, -1 line 0 comments Download
M cc/test/layer_test_common.h View 1 2 3 4 5 6 7 1 chunk +8 lines, -4 lines 0 comments Download
M cc/test/layer_test_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +18 lines, -14 lines 0 comments Download
M cc/test/tiled_layer_test_common.h View 1 2 3 4 5 6 7 8 9 7 chunks +12 lines, -12 lines 0 comments Download
M cc/test/tiled_layer_test_common.cc View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -5 lines 0 comments Download
M cc/texture_layer.h View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M cc/texture_layer.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M cc/texture_layer_impl.h View 4 2 chunks +2 lines, -2 lines 0 comments Download
M cc/texture_layer_impl.cc View 4 1 chunk +1 line, -1 line 0 comments Download
M cc/thread_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M cc/thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M cc/tile_draw_quad.h View 4 2 chunks +4 lines, -4 lines 0 comments Download
M cc/tile_draw_quad.cc View 4 1 chunk +2 lines, -2 lines 0 comments Download
M cc/tiled_layer.h View 1 2 3 4 5 6 7 8 9 5 chunks +10 lines, -10 lines 0 comments Download
M cc/tiled_layer.cc View 1 2 3 4 5 6 7 8 9 30 chunks +105 lines, -104 lines 0 comments Download
M cc/tiled_layer_impl.h View 4 1 chunk +1 line, -1 line 0 comments Download
M cc/tiled_layer_impl.cc View 4 7 chunks +15 lines, -15 lines 0 comments Download
M cc/tiled_layer_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +29 lines, -29 lines 0 comments Download
M cc/tiled_layer_unittest.cc View 1 2 3 4 5 6 7 8 9 66 chunks +202 lines, -202 lines 0 comments Download
M cc/tree_synchronizer_unittest.cc View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M cc/video_layer_impl.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M webkit/compositor_bindings/web_external_texture_layer_impl.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M webkit/compositor_bindings/web_layer_impl.cc View 4 4 chunks +7 lines, -7 lines 0 comments Download
M webkit/compositor_bindings/web_layer_tree_view_impl.cc View 1 2 3 4 5 6 3 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
danakj
This depends on the Vector2d CL https://codereview.chromium.org/11269022/ as well as the non-mutating methods CL https://codereview.chromium.org/11270042/
8 years, 1 month ago (2012-10-26 02:56:36 UTC) #1
enne (OOO)
lgtm http://codereview.chromium.org/11264056/diff/6001/cc/layer_quad.h File cc/layer_quad.h (right): http://codereview.chromium.org/11264056/diff/6001/cc/layer_quad.h#newcode65 cc/layer_quad.h:65: return FloatPoint( Don't rely on implicit conversion here. ...
8 years, 1 month ago (2012-10-29 22:23:46 UTC) #2
danakj
http://codereview.chromium.org/11264056/diff/6001/cc/layer_quad.h File cc/layer_quad.h (right): http://codereview.chromium.org/11264056/diff/6001/cc/layer_quad.h#newcode65 cc/layer_quad.h:65: return FloatPoint( On 2012/10/29 22:23:47, enne wrote: > Don't ...
8 years, 1 month ago (2012-10-31 19:45:43 UTC) #3
enne (OOO)
http://codereview.chromium.org/11264056/diff/6001/cc/layer_tiling_data.cc File cc/layer_tiling_data.cc (right): http://codereview.chromium.org/11264056/diff/6001/cc/layer_tiling_data.cc#newcode148 cc/layer_tiling_data.cc:148: return cc::IntSize(m_tilingData.totalSize()); On 2012/10/31 19:45:43, danakj wrote: > On ...
8 years, 1 month ago (2012-10-31 20:41:56 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11264056/25117
8 years, 1 month ago (2012-10-31 23:45:53 UTC) #5
tfarina
https://codereview.chromium.org/11264056/diff/15032/cc/font_atlas.h File cc/font_atlas.h (right): https://codereview.chromium.org/11264056/diff/15032/cc/font_atlas.h#newcode13 cc/font_atlas.h:13: #include "ui/gfx/rect.h" do'h! I had a patch here for ...
8 years, 1 month ago (2012-11-01 01:51:22 UTC) #6
danakj
https://codereview.chromium.org/11264056/diff/15032/cc/font_atlas.h File cc/font_atlas.h (right): https://codereview.chromium.org/11264056/diff/15032/cc/font_atlas.h#newcode13 cc/font_atlas.h:13: #include "ui/gfx/rect.h" On 2012/11/01 01:51:22, tfarina wrote: > do'h! ...
8 years, 1 month ago (2012-11-01 01:52:39 UTC) #7
tfarina
https://codereview.chromium.org/11264056/diff/23129/cc/layer.cc File cc/layer.cc (right): https://codereview.chromium.org/11264056/diff/23129/cc/layer.cc#newcode833 cc/layer.cc:833: return cc::IntRect(visibleContentRect()); nit: no cc:: here, as we are ...
8 years, 1 month ago (2012-11-01 01:54:34 UTC) #8
danakj
8 years, 1 month ago (2012-11-01 01:55:38 UTC) #9
https://codereview.chromium.org/11264056/diff/23129/cc/layer.cc
File cc/layer.cc (right):

https://codereview.chromium.org/11264056/diff/23129/cc/layer.cc#newcode833
cc/layer.cc:833: return cc::IntRect(visibleContentRect());
On 2012/11/01 01:54:34, tfarina wrote:
> nit: no cc:: here, as we are in cc namespace.

I'm just doing this to be explicit so we can easily see "IntRect" -> things to
convert to gfx::Rect, vs "cc::IntRect" -> conversions that should just be
deleted once all the types are done.

Powered by Google App Engine
This is Rietveld 408576698