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 1070433002: device scale factor detection: use gtk-xft-dpi consistently (Closed)

Created:
5 years, 8 months ago by stapelberg
Modified:
5 years, 8 months ago
CC:
chromium-reviews, tfarina, tdanderson+views_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

device scale factor detection: use gtk-xft-dpi consistently Before this CL, we used either gtk-xft-dpi (UI fonts) or the physical DPI of a more or less random display. This CL consistently uses gtk-xft-dpi which is the better alternative: users can directly influence it (by changing the Xft.dpi X resource, or via their gtkrc). See also https://github.com/derat/font-config-info for displaying your current system settings. BUG=473089, 143619 Committed: https://crrev.com/06cda64742b45e1eb10bbbb66bca4b4da2efb3c9 Cr-Commit-Position: refs/heads/master@{#324782}

Patch Set 1 #

Total comments: 2

Patch Set 2 : device scale factor detection: always use X11 root window’s dpi #

Total comments: 5

Patch Set 3 : device scale factor detection: always use X11 root window’s dpi #

Total comments: 4

Patch Set 4 : device scale factor detection: use gtk-xft-dpi consistently #

Patch Set 5 : device scale factor detection: use gtk-xft-dpi consistently #

Patch Set 6 : device scale factor detection: use gtk-xft-dpi consistently #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -30 lines) Patch
M chrome/browser/ui/libgtk2ui/gtk2_ui.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/gtk2_ui.cc View 1 2 chunks +14 lines, -4 lines 0 comments Download
M ui/views/linux_ui/linux_ui.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.cc View 1 2 3 4 5 5 chunks +12 lines, -26 lines 0 comments Download

Messages

Total messages: 38 (13 generated)
stapelberg
5 years, 8 months ago (2015-04-07 21:27:51 UTC) #2
sadrul
+oshima@ for review.
5 years, 8 months ago (2015-04-08 02:44:08 UTC) #4
oshima
https://codereview.chromium.org/1070433002/diff/1/ui/views/widget/desktop_aura/desktop_screen_x11.cc File ui/views/widget/desktop_aura/desktop_screen_x11.cc (right): https://codereview.chromium.org/1070433002/diff/1/ui/views/widget/desktop_aura/desktop_screen_x11.cc#newcode38 ui/views/widget/desktop_aura/desktop_screen_x11.cc:38: // TODO(oshima): Consider using gtk-xft-dpi instead. We should use ...
5 years, 8 months ago (2015-04-08 17:33:58 UTC) #5
stapelberg
On 2015/04/08 17:33:58, oshima wrote: > https://codereview.chromium.org/1070433002/diff/1/ui/views/widget/desktop_aura/desktop_screen_x11.cc > File ui/views/widget/desktop_aura/desktop_screen_x11.cc (right): > > https://codereview.chromium.org/1070433002/diff/1/ui/views/widget/desktop_aura/desktop_screen_x11.cc#newcode38 > ...
5 years, 8 months ago (2015-04-08 17:59:56 UTC) #6
oshima
On 2015/04/08 17:59:56, stapelberg wrote: > On 2015/04/08 17:33:58, oshima wrote: > > > https://codereview.chromium.org/1070433002/diff/1/ui/views/widget/desktop_aura/desktop_screen_x11.cc ...
5 years, 8 months ago (2015-04-08 18:16:39 UTC) #7
stapelberg
https://codereview.chromium.org/1070433002/diff/1/ui/views/widget/desktop_aura/desktop_screen_x11.cc File ui/views/widget/desktop_aura/desktop_screen_x11.cc (right): https://codereview.chromium.org/1070433002/diff/1/ui/views/widget/desktop_aura/desktop_screen_x11.cc#newcode38 ui/views/widget/desktop_aura/desktop_screen_x11.cc:38: // TODO(oshima): Consider using gtk-xft-dpi instead. On 2015/04/08 17:33:58, ...
5 years, 8 months ago (2015-04-08 21:01:06 UTC) #8
oshima
lgtm with nits https://codereview.chromium.org/1070433002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/1070433002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc#newcode1430 chrome/browser/ui/libgtk2ui/gtk2_ui.cc:1430: return ui::GetScaleForScaleFactor(ui::GetSupportedScaleFactor(scale)); you may want to ...
5 years, 8 months ago (2015-04-08 23:57:41 UTC) #9
stapelberg
https://codereview.chromium.org/1070433002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/1070433002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc#newcode1430 chrome/browser/ui/libgtk2ui/gtk2_ui.cc:1430: return ui::GetScaleForScaleFactor(ui::GetSupportedScaleFactor(scale)); On 2015/04/08 23:57:41, oshima wrote: > you ...
5 years, 8 months ago (2015-04-09 06:49:35 UTC) #10
stapelberg
erg, can you please take a look for OWNERS approval? Thank you.
5 years, 8 months ago (2015-04-09 06:53:38 UTC) #12
Elliot Glaysher
https://codereview.chromium.org/1070433002/diff/40001/ui/views/widget/desktop_aura/desktop_screen_x11.cc File ui/views/widget/desktop_aura/desktop_screen_x11.cc (right): https://codereview.chromium.org/1070433002/diff/40001/ui/views/widget/desktop_aura/desktop_screen_x11.cc#newcode284 ui/views/widget/desktop_aura/desktop_screen_x11.cc:284: { Is there a reason this is in a ...
5 years, 8 months ago (2015-04-09 16:47:27 UTC) #14
sadrul
https://codereview.chromium.org/1070433002/diff/40001/ui/views/linux_ui/linux_ui.h File ui/views/linux_ui/linux_ui.h (right): https://codereview.chromium.org/1070433002/diff/40001/ui/views/linux_ui/linux_ui.h#newcode156 ui/views/linux_ui/linux_ui.h:156: virtual void UpdateDeviceScaleFactor(float device_scale_factor) = 0; Given that LinuxUI ...
5 years, 8 months ago (2015-04-09 16:50:01 UTC) #15
oshima
https://codereview.chromium.org/1070433002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/1070433002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc#newcode1430 chrome/browser/ui/libgtk2ui/gtk2_ui.cc:1430: return ui::GetScaleForScaleFactor(ui::GetSupportedScaleFactor(scale)); On 2015/04/09 06:49:34, stapelberg wrote: > On ...
5 years, 8 months ago (2015-04-09 17:22:23 UTC) #16
stapelberg
On 2015/04/09 17:22:23, oshima wrote: > https://codereview.chromium.org/1070433002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc > File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): > > https://codereview.chromium.org/1070433002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc#newcode1430 > ...
5 years, 8 months ago (2015-04-09 18:11:15 UTC) #17
stapelberg
PTAL. https://codereview.chromium.org/1070433002/diff/40001/ui/views/linux_ui/linux_ui.h File ui/views/linux_ui/linux_ui.h (right): https://codereview.chromium.org/1070433002/diff/40001/ui/views/linux_ui/linux_ui.h#newcode156 ui/views/linux_ui/linux_ui.h:156: virtual void UpdateDeviceScaleFactor(float device_scale_factor) = 0; On 2015/04/09 ...
5 years, 8 months ago (2015-04-09 18:11:29 UTC) #18
oshima
On 2015/04/09 18:11:15, stapelberg wrote: > On 2015/04/09 17:22:23, oshima wrote: > > > https://codereview.chromium.org/1070433002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc ...
5 years, 8 months ago (2015-04-09 18:18:10 UTC) #19
oshima
On 2015/04/09 18:11:29, stapelberg wrote: > PTAL. > > https://codereview.chromium.org/1070433002/diff/40001/ui/views/linux_ui/linux_ui.h > File ui/views/linux_ui/linux_ui.h (right): > ...
5 years, 8 months ago (2015-04-09 18:53:11 UTC) #20
stapelberg
erg, friendly ping? I’d like to get this in ASAP so that the next chrome ...
5 years, 8 months ago (2015-04-10 05:19:34 UTC) #21
Elliot Glaysher
lgtm
5 years, 8 months ago (2015-04-10 17:12:51 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1070433002/60001
5 years, 8 months ago (2015-04-10 20:35:29 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel/builds/54455)
5 years, 8 months ago (2015-04-11 03:26:29 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1070433002/80001
5 years, 8 months ago (2015-04-11 07:42:10 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1070433002/100001
5 years, 8 months ago (2015-04-11 08:27:02 UTC) #35
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 8 months ago (2015-04-11 14:09:05 UTC) #36
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/06cda64742b45e1eb10bbbb66bca4b4da2efb3c9 Cr-Commit-Position: refs/heads/master@{#324782}
5 years, 8 months ago (2015-04-11 14:10:00 UTC) #37
Timothy Loh
5 years, 8 months ago (2015-04-13 03:00:26 UTC) #38
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/1079883002/ by timloh@chromium.org.

The reason for reverting is: This patch makes content_shell segfault during
startup.

Program received signal SIGSEGV, Segmentation fault.
0x00000000049d190a in views::DesktopScreenX11::BuildDisplaysFromXRandRInfo
(this=0x35ed099f9200) at
../../ui/views/widget/desktop_aura/desktop_screen_x11.cc:291
291           views::LinuxUI::instance()->GetDeviceScaleFactor();
(gdb) bt
#0  0x00000000049d190a in views::DesktopScreenX11::BuildDisplaysFromXRandRInfo
(this=0x35ed099f9200) at
../../ui/views/widget/desktop_aura/desktop_screen_x11.cc:291
#1  0x00000000049d096f in views::DesktopScreenX11::DesktopScreenX11
(this=0x35ed099f9200) at
../../ui/views/widget/desktop_aura/desktop_screen_x11.cc:107
#2  0x00000000049d1fab in views::CreateDesktopScreen () at
../../ui/views/widget/desktop_aura/desktop_screen_x11.cc:370
#3  0x0000000000451f28 in content::Shell::PlatformInitialize
(default_window_size=...) at ../../content/shell/browser/shell_views.cc:421
#4  0x0000000000440158 in content::Shell::Initialize () at
../../content/shell/browser/shell.cc:146.

Powered by Google App Engine
This is Rietveld 408576698