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

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed)

Created:
5 years, 3 months ago by danakj
Modified:
5 years, 2 months ago
CC:
chromium-reviews, sadrul, yusukes+watch_chromium.org, posciak+watch_chromium.org, nasko+codewatch_chromium.org, dcheng, sievers+watch_chromium.org, rsesek+watch_chromium.org, jdduke+watch_chromium.org, miu+watch_chromium.org, extensions-reviews_chromium.org, tdanderson+views_chromium.org, jam, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, devtools-reviews_chromium.org, kalyank, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, tdresser+watch_chromium.org, feature-media-reviews_chromium.org, chromium-apps-reviews_chromium.org, piman+watch_chromium.org, danakj+watch_chromium.org, tfarina, shuchen+watch_chromium.org, mcasas+watch_chromium.org, yurys, mkwst+moarreviews-renderer_chromium.org, cc-bugs_chromium.org, James Su, pfeldman, enne (OOO), piman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

gfx: Make conversions from Size to SizeF be explicit. This removes the implicit operator from Size to SizeF and adds an explicit constructor instead. There are many places in the code that want to do: an_integer_size = ToFlooredSize(ScaleSize(an_integer_size, x)); This would make these all look like an_integer_size = ToFlooredSize(ScaleSize(gfx::RectF(an_integer_size), x)); But that's pretty verbose. So add helpers similar to those we have already for gfx::Rect, for when you want to scale a Size to a Size, such as an_integer_size = ScaleToFlooredSize(an_integer_size, x); R=sky@chromium.org, vmpstr BUG=342848 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/ddaec91ec046e8a389d16049c0a2656a4e41a2ad Cr-Commit-Position: refs/heads/master@{#350889}

Patch Set 1 #

Total comments: 12

Patch Set 2 : sizefconvert-gfx: . #

Patch Set 3 : sizefconvert-gfx: removetodo #

Patch Set 4 : sizefconvert-gfx: ccperftests #

Patch Set 5 : sizefconvert-gfx: rebase #

Patch Set 6 : sizefconvert-gfx: blinktests #

Patch Set 7 : sizefconvert-gfx: more #

Patch Set 8 : sizefconvert-gfx: moremore #

Patch Set 9 : sizefconvert-gfx: . #

Patch Set 10 : sizefconvert-gfx: . #

Patch Set 11 : sizefconvert-gfx: . #

Patch Set 12 : sizefconvert-gfx: macmoremac #

Patch Set 13 : sizefconvert-gfx: . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+324 lines, -296 lines) Patch
M ash/desktop_background/desktop_background_view.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M ash/display/display_manager.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/drag_drop/drag_drop_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M ash/drag_drop/drag_image_view.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/touch/touch_transformer_controller.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -4 lines 0 comments Download
M cc/base/math_util.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/blink/web_layer_impl_fixed_bounds_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M cc/input/input_handler.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/input/page_scale_animation.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/input/page_scale_animation.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/heads_up_display_layer_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/layer.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/layer_impl.cc View 4 chunks +7 lines, -6 lines 0 comments Download
M cc/layers/painted_scrollbar_layer.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 2 3 4 4 chunks +7 lines, -7 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/render_surface_impl.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M cc/layers/viewport.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +9 lines, -9 lines 0 comments Download
M cc/output/renderer_pixeltest.cc View 1 2 3 4 1 chunk +6 lines, -5 lines 0 comments Download
M cc/output/software_renderer.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/output/software_renderer_unittest.cc View 2 chunks +9 lines, -27 lines 0 comments Download
M cc/playback/display_item_list_unittest.cc View 6 chunks +8 lines, -6 lines 0 comments Download
M cc/playback/display_list_raster_source_unittest.cc View 5 chunks +6 lines, -6 lines 0 comments Download
M cc/test/layer_test_common.cc View 1 2 3 4 1 chunk +3 lines, -5 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M cc/tiles/picture_layer_tiling.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M cc/tiles/picture_layer_tiling_set_unittest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M cc/tiles/picture_layer_tiling_unittest.cc View 1 2 3 4 2 chunks +3 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_common.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_common_perftest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_common_unittest.cc View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 6 chunks +10 lines, -9 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_damage.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_impl_unittest.cc View 1 2 3 4 4 chunks +6 lines, -6 lines 0 comments Download
M cc/trees/property_tree_builder.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/android/compositor/layer/thumbnail_layer.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/thumbnail/thumbnail.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/thumbnail/thumbnail.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/android/thumbnail/thumbnail_cache.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/themes/browser_theme_pack.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/browser/thumbnails/simple_thumbnail_crop.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/thumbnails/simple_thumbnail_crop_unittest.cc View 3 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/printing_gtk2_util.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_render_frame_observer.cc View 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/android/edge_effect_l.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/devtools/protocol/page_handler.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/input/touch_emulator.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_browsertest.cc View 1 2 3 4 5 6 4 chunks +4 lines, -8 lines 0 comments Download
M content/common/cursors/webcursor_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/child_frame_compositing_helper.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/disambiguation_popup_helper.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/disambiguation_popup_helper_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_graphics_2d_host.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 2 chunks +3 lines, -4 lines 0 comments Download
M extensions/browser/api/capture_web_contents_function.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/extension_icon_image.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M media/blink/skcanvas_video_renderer.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/test/test_screen.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/base/cursor/cursor_util.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/chromeos/network/network_icon.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M ui/events/gesture_detection/gesture_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/canvas.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/gfx/display.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M ui/gfx/geometry/dip_util.cc View 1 chunk +17 lines, -21 lines 0 comments Download
M ui/gfx/geometry/rect_f.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M ui/gfx/geometry/size.h View 3 chunks +14 lines, -5 lines 0 comments Download
M ui/gfx/geometry/size.cc View 2 chunks +37 lines, -0 lines 0 comments Download
M ui/gfx/geometry/size_f.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M ui/gfx/geometry/size_unittest.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M ui/gfx/image/image_skia.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/image/image_skia_operations.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/platform_font_mac.mm View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/render_text.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/screen_android.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M ui/gfx/win/dpi.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M ui/ozone/demo/renderer_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ozone/platform/egltest/ozone_platform_egltest.cc View 1 2 chunks +5 lines, -3 lines 0 comments Download
M ui/views/animation/ink_drop_animation.h View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/animation/ink_drop_animation.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/animation/ink_drop_animation_unittest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/animation/test/ink_drop_animation_test_api.h View 2 chunks +3 lines, -3 lines 0 comments Download
M ui/views/animation/test/ink_drop_animation_test_api.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M ui/wm/core/image_grid.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 32 (10 generated)
danakj
sky: please review ui/ ash/ and chrome/ (mostly mechanical outside of ui/gfx/) vmpstr: please review ...
5 years, 3 months ago (2015-09-23 22:48:00 UTC) #2
vmpstr
cc lgtm, with just a couple of nits https://codereview.chromium.org/1357423009/diff/1/cc/layers/viewport.cc File cc/layers/viewport.cc (right): https://codereview.chromium.org/1357423009/diff/1/cc/layers/viewport.cc#newcode70 cc/layers/viewport.cc:70: gfx::SizeF ...
5 years, 3 months ago (2015-09-23 23:04:25 UTC) #3
danakj
https://codereview.chromium.org/1357423009/diff/1/cc/layers/viewport.cc File cc/layers/viewport.cc (right): https://codereview.chromium.org/1357423009/diff/1/cc/layers/viewport.cc#newcode70 cc/layers/viewport.cc:70: gfx::SizeF viewport_size = gfx::SizeF( On 2015/09/23 23:04:25, vmpstr wrote: ...
5 years, 3 months ago (2015-09-23 23:08:20 UTC) #4
vmpstr
On 2015/09/23 23:08:20, danakj wrote: > https://codereview.chromium.org/1357423009/diff/1/cc/layers/viewport.cc > File cc/layers/viewport.cc (right): > > https://codereview.chromium.org/1357423009/diff/1/cc/layers/viewport.cc#newcode70 > ...
5 years, 3 months ago (2015-09-23 23:20:13 UTC) #5
danakj
On Wed, Sep 23, 2015 at 4:20 PM, <vmpstr@chromium.org> wrote: > On 2015/09/23 23:08:20, danakj ...
5 years, 3 months ago (2015-09-23 23:38:06 UTC) #6
danakj
On Wed, Sep 23, 2015 at 4:32 PM, Dana Jansens <danakj@chromium.org> wrote: > I thought ...
5 years, 3 months ago (2015-09-23 23:41:26 UTC) #7
sky
LGTM
5 years, 3 months ago (2015-09-23 23:53:12 UTC) #8
no sievers
https://codereview.chromium.org/1357423009/diff/1/content/browser/devtools/protocol/page_handler.cc File content/browser/devtools/protocol/page_handler.cc (right): https://codereview.chromium.org/1357423009/diff/1/content/browser/devtools/protocol/page_handler.cc#newcode401 content/browser/devtools/protocol/page_handler.cc:401: gfx::ScaleSize(gfx::SizeF(view->GetPhysicalBackingSize()), maybe this should have a version of ScaleSize() ...
5 years, 3 months ago (2015-09-24 00:07:33 UTC) #9
danakj
+dalecurtis for media/ https://codereview.chromium.org/1357423009/diff/1/content/browser/devtools/protocol/page_handler.cc File content/browser/devtools/protocol/page_handler.cc (right): https://codereview.chromium.org/1357423009/diff/1/content/browser/devtools/protocol/page_handler.cc#newcode401 content/browser/devtools/protocol/page_handler.cc:401: gfx::ScaleSize(gfx::SizeF(view->GetPhysicalBackingSize()), On 2015/09/24 00:07:33, sievers wrote: ...
5 years, 3 months ago (2015-09-24 00:36:05 UTC) #11
DaleCurtis
https://codereview.chromium.org/1357423009/diff/1/media/blink/skcanvas_video_renderer.cc File media/blink/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/1357423009/diff/1/media/blink/skcanvas_video_renderer.cc#newcode355 media/blink/skcanvas_video_renderer.cc:355: dest_rect.size() != gfx::SizeF(video_frame->visible_rect().size()) || On 2015/09/24 00:36:05, danakj wrote: ...
5 years, 3 months ago (2015-09-24 01:40:09 UTC) #12
danakj
https://codereview.chromium.org/1357423009/diff/1/media/blink/skcanvas_video_renderer.cc File media/blink/skcanvas_video_renderer.cc (right): https://codereview.chromium.org/1357423009/diff/1/media/blink/skcanvas_video_renderer.cc#newcode355 media/blink/skcanvas_video_renderer.cc:355: dest_rect.size() != gfx::SizeF(video_frame->visible_rect().size()) || On 2015/09/24 01:40:09, DaleCurtis wrote: ...
5 years, 3 months ago (2015-09-24 17:48:35 UTC) #13
no sievers
On 2015/09/24 17:48:35, danakj wrote: > https://codereview.chromium.org/1357423009/diff/1/media/blink/skcanvas_video_renderer.cc > File media/blink/skcanvas_video_renderer.cc (right): > > https://codereview.chromium.org/1357423009/diff/1/media/blink/skcanvas_video_renderer.cc#newcode355 > ...
5 years, 3 months ago (2015-09-24 17:55:06 UTC) #14
danakj
+mek for extensions
5 years, 3 months ago (2015-09-24 17:58:56 UTC) #16
Marijn Kruisselbrink
extensions lgtm
5 years, 3 months ago (2015-09-24 18:02:00 UTC) #17
danakj
media followup: https://codereview.chromium.org/1369563002
5 years, 3 months ago (2015-09-24 18:10:02 UTC) #18
DaleCurtis
media/ lgtm
5 years, 3 months ago (2015-09-24 19:32:17 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1357423009/110083 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1357423009/110083
5 years, 3 months ago (2015-09-25 00:41:19 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1357423009/210001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1357423009/210001
5 years, 3 months ago (2015-09-25 00:43:10 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/36668)
5 years, 3 months ago (2015-09-25 01:17:21 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1357423009/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1357423009/230001
5 years, 2 months ago (2015-09-25 17:39:40 UTC) #30
commit-bot: I haz the power
Committed patchset #13 (id:230001)
5 years, 2 months ago (2015-09-25 19:38:59 UTC) #31
commit-bot: I haz the power
5 years, 2 months ago (2015-09-25 19:40:05 UTC) #32
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/ddaec91ec046e8a389d16049c0a2656a4e41a2ad
Cr-Commit-Position: refs/heads/master@{#350889}

Powered by Google App Engine
This is Rietveld 408576698