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

Issue 11081007: Remove implicit flooring Scale() method from Point and Size. (Closed)

Created:
8 years, 2 months ago by danakj
Modified:
8 years, 2 months ago
CC:
chromium-reviews, Avi (use Gerrit), mihaip-chromium-reviews_chromium.org, sadrul, nkostylev+watch_chromium.org, derat+watch_chromium.org, ben+watch_chromium.org, Ian Vollick, jonathan.backer, jam, piman+watch_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, rsesek+watch_chromium.org, darin-cc_chromium.org, oshima+watch_chromium.org, ajwong+watch_chromium.org, creis+watch_chromium.org, cc-bugs_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, yusukes+watch_chromium.org, piman, backer, enne (OOO), jamesr
Visibility:
Public.

Description

Remove implicit flooring Scale() method from Point and Size. When scaling an integer point or size, return a floating point result. Implicitly flooring hides design problems and bugs. Add conversion functions to floor or ceil a SizeF or PointF into an integer format again. All existing behaviour has been preserved by replacing uses of foo.Scale() with ToFlooredFoo(foo.Scale()). R=sky BUG=147395 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=160970

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : git try -b win_rel,mac_rel,linux_rel,linux_aura #

Total comments: 6

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+250 lines, -94 lines) Patch
M ash/display/multi_display_manager.cc View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M ash/touch/touch_uma.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/chromeos/status/network_menu_icon.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_icon_image.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/thumbnails/render_widget_snapshot_taker.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/thumbnails/thumbnail_tab_helper.cc View 1 2 3 4 5 4 chunks +7 lines, -5 lines 0 comments Download
M content/browser/renderer_host/backing_store_aura.cc View 1 5 chunks +7 lines, -5 lines 0 comments Download
M content/browser/renderer_host/backing_store_mac.mm View 1 2 4 chunks +5 lines, -3 lines 0 comments Download
M content/browser/renderer_host/compositing_iosurface_mac.mm View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M content/browser/renderer_host/dip_util.cc View 1 2 chunks +12 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M content/common/gpu/gpu_memory_manager_unittest.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_backing_store.cc View 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M content/renderer/render_widget_fullscreen_pepper.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M ui/aura/root_window.cc View 1 2 3 4 5 3 chunks +4 lines, -2 lines 0 comments Download
M ui/base/resource/resource_bundle.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M ui/base/x/x11_util.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M ui/compositor/dip_util.cc View 2 chunks +13 lines, -8 lines 0 comments Download
M ui/compositor/layer.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M ui/gfx/canvas.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M ui/gfx/display.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M ui/gfx/image/image_skia_operations.cc View 2 chunks +3 lines, -1 line 0 comments Download
M ui/gfx/point.h View 1 chunk +8 lines, -0 lines 0 comments Download
M ui/gfx/point_base.h View 1 chunk +0 lines, -9 lines 0 comments Download
A ui/gfx/point_conversions.h View 1 2 3 4 5 1 chunk +21 lines, -0 lines 0 comments Download
A ui/gfx/point_conversions.cc View 1 chunk +24 lines, -0 lines 0 comments Download
M ui/gfx/point_f.h View 1 chunk +8 lines, -0 lines 0 comments Download
M ui/gfx/shadow_value.cc View 2 chunks +3 lines, -1 line 0 comments Download
M ui/gfx/size.h View 1 chunk +8 lines, -0 lines 0 comments Download
M ui/gfx/size_base.h View 1 chunk +0 lines, -9 lines 0 comments Download
A ui/gfx/size_conversions.h View 1 2 3 4 5 6 1 chunk +21 lines, -0 lines 0 comments Download
A ui/gfx/size_conversions.cc View 1 chunk +24 lines, -0 lines 0 comments Download
M ui/gfx/size_f.h View 1 chunk +8 lines, -0 lines 0 comments Download
M ui/ui.gyp View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M webkit/glue/webcursor_aurax11.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_2d_impl.cc View 1 2 3 4 4 chunks +11 lines, -16 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
danakj
No change in behaviour, just making the flooring operation explicit for integer scaling.
8 years, 2 months ago (2012-10-07 18:31:54 UTC) #1
not at google - send to devlin
extensions lgtm
8 years, 2 months ago (2012-10-08 06:02:22 UTC) #2
Nico
This CL has six people on the Reviewers: line. Can you say what you want ...
8 years, 2 months ago (2012-10-08 11:12:36 UTC) #3
danakj
Sure! Sky please look at the ui/gfx changes. Everyone else is an owner of some ...
8 years, 2 months ago (2012-10-08 15:03:07 UTC) #4
sky
ui/gfx LGTM http://codereview.chromium.org/11081007/diff/1072/ui/gfx/point_conversions.h File ui/gfx/point_conversions.h (right): http://codereview.chromium.org/11081007/diff/1072/ui/gfx/point_conversions.h#newcode13 ui/gfx/point_conversions.h:13: // Returns the smallest Rect that encloses ...
8 years, 2 months ago (2012-10-08 15:45:39 UTC) #5
oshima
chromeos LGTM
8 years, 2 months ago (2012-10-08 17:18:30 UTC) #6
sadrul
LGTM (reviewed only touch/, renderer_host/, x11_util) http://codereview.chromium.org/11081007/diff/1072/content/browser/renderer_host/dip_util.cc File content/browser/renderer_host/dip_util.cc (left): http://codereview.chromium.org/11081007/diff/1072/content/browser/renderer_host/dip_util.cc#oldcode42 content/browser/renderer_host/dip_util.cc:42: rect_in_pixel.size().Scale(scale)); Curious why ...
8 years, 2 months ago (2012-10-08 23:05:23 UTC) #7
danakj
http://codereview.chromium.org/11081007/diff/1072/content/browser/renderer_host/dip_util.cc File content/browser/renderer_host/dip_util.cc (left): http://codereview.chromium.org/11081007/diff/1072/content/browser/renderer_host/dip_util.cc#oldcode42 content/browser/renderer_host/dip_util.cc:42: rect_in_pixel.size().Scale(scale)); On 2012/10/08 23:05:23, sadrul wrote: > Curious why ...
8 years, 2 months ago (2012-10-09 04:28:00 UTC) #8
danakj
+jamesr for webkit/
8 years, 2 months ago (2012-10-09 17:39:06 UTC) #9
danakj
+piman for ui/compositor
8 years, 2 months ago (2012-10-09 17:39:54 UTC) #10
danakj
+avi for chrome/browser/tab_contents +sail for ui/base/resource +jamesr also for content/renderer
8 years, 2 months ago (2012-10-09 17:43:38 UTC) #11
piman
LGTM - I guess the plan is for someone to come back and fix issues ...
8 years, 2 months ago (2012-10-09 17:44:25 UTC) #12
danakj
On 2012/10/09 17:44:25, piman wrote: > LGTM - I guess the plan is for someone ...
8 years, 2 months ago (2012-10-09 17:45:10 UTC) #13
piman
LGTM for content/ too.
8 years, 2 months ago (2012-10-09 17:45:55 UTC) #14
sail
ui/base/resource LGTM
8 years, 2 months ago (2012-10-09 17:50:31 UTC) #15
jamesr
webkit/ lgtm
8 years, 2 months ago (2012-10-09 18:17:37 UTC) #16
Avi (use Gerrit)
LGTM even though ThumbnailGenerator isn't in tab_contents any more so you don't need it.
8 years, 2 months ago (2012-10-09 18:38:39 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11081007/17004
8 years, 2 months ago (2012-10-09 20:21:32 UTC) #18
danakj
thanks everyone :)
8 years, 2 months ago (2012-10-09 20:21:55 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11081007/18005
8 years, 2 months ago (2012-10-09 20:51:58 UTC) #20
commit-bot: I haz the power
8 years, 2 months ago (2012-10-09 23:17:37 UTC) #21
Change committed as 160970

Powered by Google App Engine
This is Rietveld 408576698