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

Issue 2739113002: Simplify calls for scale factor (Closed)

Created:
3 years, 9 months ago by Jinsuk Kim
Modified:
3 years, 9 months ago
CC:
chromium-reviews, sadrul, yusukes+watch_chromium.org, tfarina, shuchen+watch_chromium.org, mac-reviews_chromium.org, jam, dcheng, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, kalyank, danakj+watch_chromium.org, James Su
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify calls for scale factor Made callsites simpler by replacing multiple commands with one api |ui::GetScaleFactorForNativeView(gfx::NativeView)|. Android got further simpler by |ViewAndroid::GetDipScale()| BUG=699891 Review-Url: https://codereview.chromium.org/2739113002 Cr-Commit-Position: refs/heads/master@{#456560} Committed: https://chromium.googlesource.com/chromium/src/+/61bc73e74f6cd55f220c22d2c8f154573b2f1ef8

Patch Set 1 #

Patch Set 2 : fix mac tests #

Total comments: 2

Patch Set 3 : comment #

Total comments: 5

Patch Set 4 : Display::GetForcedDeviceScaleFactor() #

Total comments: 4

Patch Set 5 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -91 lines) Patch
M content/browser/compositor/mus_browser_compositor_output_surface.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 4 chunks +6 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 4 chunks +3 lines, -10 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 1 2 chunks +4 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 chunks +2 lines, -11 lines 0 comments Download
M ui/aura/mus/window_tree_client.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M ui/aura/window_tree_host.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M ui/aura/window_tree_host_platform.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M ui/aura/window_tree_host_x11.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M ui/base/layout.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M ui/base/layout_mac.mm View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M ui/snapshot/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M ui/snapshot/snapshot_android.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.mm View 2 chunks +3 lines, -7 lines 0 comments Download
M ui/views/drag_utils.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 2 chunks +3 lines, -7 lines 0 comments Download

Messages

Total messages: 45 (29 generated)
Jinsuk Kim
Note: render_widget_host_view_mac.mm was changed so that only ctor / |display::DisplayObserver::OnDisplayMetricsChanged| call |Screen::GetDisplayNearestWindow| which is expensive ...
3 years, 9 months ago (2017-03-12 23:17:21 UTC) #21
tapted
https://codereview.chromium.org/2739113002/diff/60001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/2739113002/diff/60001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode1732 content/browser/renderer_host/render_widget_host_view_mac.mm:1732: device_scale_factor_ = display.device_scale_factor(); This isn't quite the same. OnDisplayMetricsChanged() ...
3 years, 9 months ago (2017-03-13 00:02:33 UTC) #22
Jinsuk Kim
https://codereview.chromium.org/2739113002/diff/60001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/2739113002/diff/60001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode1732 content/browser/renderer_host/render_widget_host_view_mac.mm:1732: device_scale_factor_ = display.device_scale_factor(); On 2017/03/13 00:02:33, tapted wrote: > ...
3 years, 9 months ago (2017-03-13 00:25:01 UTC) #23
tapted
lgtm with the following - thanks! https://codereview.chromium.org/2739113002/diff/80001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/2739113002/diff/80001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode1521 content/browser/renderer_host/render_widget_host_view_mac.mm:1521: float scale_factor = ...
3 years, 9 months ago (2017-03-13 00:28:39 UTC) #24
Jinsuk Kim
https://codereview.chromium.org/2739113002/diff/80001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/2739113002/diff/80001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode1521 content/browser/renderer_host/render_widget_host_view_mac.mm:1521: float scale_factor = display::Screen::GetScreen() On 2017/03/13 00:28:39, tapted wrote: ...
3 years, 9 months ago (2017-03-13 00:31:30 UTC) #25
tapted
https://codereview.chromium.org/2739113002/diff/80001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/2739113002/diff/80001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode1521 content/browser/renderer_host/render_widget_host_view_mac.mm:1521: float scale_factor = display::Screen::GetScreen() On 2017/03/13 00:31:30, Jinsuk Kim ...
3 years, 9 months ago (2017-03-13 00:44:34 UTC) #26
Jinsuk Kim
On 2017/03/13 00:44:34, tapted wrote: > https://codereview.chromium.org/2739113002/diff/80001/content/browser/renderer_host/render_widget_host_view_mac.mm > File content/browser/renderer_host/render_widget_host_view_mac.mm (right): > > https://codereview.chromium.org/2739113002/diff/80001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode1521 > ...
3 years, 9 months ago (2017-03-13 01:03:49 UTC) #27
Jinsuk Kim
avi@ please review the changes in: ui/snapshot/DEPS which added a new depend-on path erg@ please ...
3 years, 9 months ago (2017-03-13 01:37:02 UTC) #29
Avi (use Gerrit)
On 2017/03/13 01:37:02, Jinsuk Kim wrote: > avi@ please review the changes in: > ui/snapshot/DEPS ...
3 years, 9 months ago (2017-03-13 01:46:19 UTC) #30
tapted
still lgtm % nit https://codereview.chromium.org/2739113002/diff/100001/ui/base/layout_mac.mm File ui/base/layout_mac.mm (right): https://codereview.chromium.org/2739113002/diff/100001/ui/base/layout_mac.mm#newcode10 ui/base/layout_mac.mm:10: #include <Cocoa/Cocoa.h> nit: this should ...
3 years, 9 months ago (2017-03-13 01:47:01 UTC) #31
boliu
lgtm https://codereview.chromium.org/2739113002/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (left): https://codereview.chromium.org/2739113002/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#oldcode666 content/browser/renderer_host/render_widget_host_view_android.cc:666: * ui::GetScaleFactorForNativeView(GetNativeView()), all other platforms are switching to ...
3 years, 9 months ago (2017-03-13 01:51:57 UTC) #32
Jinsuk Kim
https://codereview.chromium.org/2739113002/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (left): https://codereview.chromium.org/2739113002/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#oldcode666 content/browser/renderer_host/render_widget_host_view_android.cc:666: * ui::GetScaleFactorForNativeView(GetNativeView()), On 2017/03/13 01:51:57, boliu wrote: > all ...
3 years, 9 months ago (2017-03-13 01:58:22 UTC) #33
Elliot Glaysher
renames in x11 lgtm
3 years, 9 months ago (2017-03-13 17:44:32 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2739113002/120001
3 years, 9 months ago (2017-03-13 23:26:28 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2739113002/120001
3 years, 9 months ago (2017-03-13 23:55:54 UTC) #42
commit-bot: I haz the power
3 years, 9 months ago (2017-03-14 00:37:57 UTC) #45
Message was sent while issue was closed.
Committed patchset #5 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/61bc73e74f6cd55f220c22d2c8f1...

Powered by Google App Engine
This is Rietveld 408576698