|
|
DescriptionCompute the base dpi from X
X uses 96 as default, and alters the screen size
but it can be overwritten. Compute the dpi from X
to match what gtk sues as base.
Round the dsf to 1 decimals as finer grained value can cause rendering problem than benefit.
Gpu test expectation on nvidia needs to be updated, so mark these tests as failing now.
BUG=485183
Committed: https://crrev.com/5cb0c01e4233ff3eb1e7f6f677b4cf9dae9ffaf2
Cr-Commit-Position: refs/heads/master@{#330212}
Patch Set 1 : #Patch Set 2 : kill empty line #
Total comments: 2
Patch Set 3 : #
Total comments: 4
Patch Set 4 : #Patch Set 5 : #
Total comments: 2
Patch Set 6 : fix comment #Patch Set 7 : mark the tests whose expectations need to be updated failing #
Total comments: 4
Patch Set 8 : #Patch Set 9 : #
Messages
Total messages: 37 (14 generated)
Patchset #1 (id:1) has been deleted
oshima@chromium.org changed reviewers: + estade@chromium.org, mdempsky@chromium.org
Patchset #1 (id:20001) has been deleted
estade@ for owners review mdempsky@, would you mind testing this patch and see if it fixes the issue on your environment?
https://codereview.chromium.org/1136913005/diff/60001/chrome/browser/ui/libgt... File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/1136913005/diff/60001/chrome/browser/ui/libgt... chrome/browser/ui/libgtk2ui/gtk2_ui.cc:386: return (static_cast<double>(DisplayWidth(xdisplay, xscreen)) * 25.4) / is this casting truly necessary? 25.4 is already a double, so I think everything else will be converted to a double
https://codereview.chromium.org/1136913005/diff/60001/chrome/browser/ui/libgt... File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/1136913005/diff/60001/chrome/browser/ui/libgt... chrome/browser/ui/libgtk2ui/gtk2_ui.cc:386: return (static_cast<double>(DisplayWidth(xdisplay, xscreen)) * 25.4) / On 2015/05/13 22:09:27, Evan Stade wrote: > is this casting truly necessary? 25.4 is already a double, so I think everything > else will be converted to a double I was lazy, sorry. (was cut&paste) Fixed.
I'll owner stamp after mdempsky review
I'll try it out. https://codereview.chromium.org/1136913005/diff/80001/chrome/browser/ui/libgt... File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/1136913005/diff/80001/chrome/browser/ui/libgt... chrome/browser/ui/libgtk2ui/gtk2_ui.cc:386: return (DisplayWidth(xdisplay, xscreen) * 25.4) / gdk uses DisplayHeight and DisplayHeightMM, not DisplayWidth and DisplayWidthMM. It probably doesn't matter in practice, but seems like we should be consistent with them. https://codereview.chromium.org/1136913005/diff/80001/chrome/browser/ui/libgt... chrome/browser/ui/libgtk2ui/gtk2_ui.cc:1437: float scale = GetFontDPI() / GetBaseDPI(); This formulation seems odd to me. If gtk-xft-dpi isn't set (which I would expect to be the common case), you're calculating GetBaseDPI() / GetBaseDPI(), which will always evaluate to 1.0, but will require extra calls to DisplayWidth, etc.
https://codereview.chromium.org/1136913005/diff/80001/chrome/browser/ui/libgt... File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/1136913005/diff/80001/chrome/browser/ui/libgt... chrome/browser/ui/libgtk2ui/gtk2_ui.cc:386: return (DisplayWidth(xdisplay, xscreen) * 25.4) / On 2015/05/13 22:26:46, mdempsky wrote: > gdk uses DisplayHeight and DisplayHeightMM, not DisplayWidth and DisplayWidthMM. > It probably doesn't matter in practice, but seems like we should be consistent > with them. good point. done. https://codereview.chromium.org/1136913005/diff/80001/chrome/browser/ui/libgt... chrome/browser/ui/libgtk2ui/gtk2_ui.cc:1437: float scale = GetFontDPI() / GetBaseDPI(); On 2015/05/13 22:26:46, mdempsky wrote: > This formulation seems odd to me. If gtk-xft-dpi isn't set (which I would > expect to be the common case), you're calculating GetBaseDPI() / GetBaseDPI(), > which will always evaluate to 1.0, but will require extra calls to DisplayWidth, > etc. gtk-xft-dpi is used to set font scale so this should be available when a user wants larger fonts, at least on ubuntu / gnome environment. I don't know about kde/qt, but that's the outside of the scope of this CL, as this class is meant for gtk integration. DisplayWidth/MM are macros which just access the members of Display struct so it should be very fast.
Looks right to me on my HP Z30i when I disable the "Xft.dpi: 96" workaround. This error message gets spammed a bajillion times per second to the console while I move my mouse around though: [11619:11619:0513/161402:ERROR:gtk2_ui.cc(1436)] GetBaseDPI:100.969
On 2015/05/13 23:14:36, mdempsky wrote: > Looks right to me on my HP Z30i when I disable the "Xft.dpi: 96" workaround. > This error message gets spammed a bajillion times per second to the console > while I move my mouse around though: > > [11619:11619:0513/161402:ERROR:gtk2_ui.cc(1436)] GetBaseDPI:100.969 oops, sorry. removed. I think caller should cache it if appropriate. I'll look into in a separate CL.
mdempsky: ping?
lgtm
lgtm https://codereview.chromium.org/1136913005/diff/120001/chrome/browser/ui/libg... File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/1136913005/diff/120001/chrome/browser/ui/libg... chrome/browser/ui/libgtk2ui/gtk2_ui.cc:1437: // Round to 1 decimals, e.g. to 1.4. nit: 1 decimal
https://codereview.chromium.org/1136913005/diff/120001/chrome/browser/ui/libg... File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/1136913005/diff/120001/chrome/browser/ui/libg... chrome/browser/ui/libgtk2ui/gtk2_ui.cc:1437: // Round to 1 decimals, e.g. to 1.4. On 2015/05/14 22:43:04, Evan Stade wrote: > nit: 1 decimal Done.
The CQ bit was checked by oshima@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from estade@chromium.org, mdempsky@chromium.org Link to the patchset: https://codereview.chromium.org/1136913005/#ps140001 (title: "fix comment")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1136913005/140001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by oshima@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1136913005/140001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
oshima@chromium.org changed reviewers: + kbr@chromium.org
+kbr@ for content/test/gpu/gpu_tests/pixel_expectations.py
https://codereview.chromium.org/1136913005/diff/160001/content/test/gpu/gpu_t... File content/test/gpu/gpu_tests/pixel_expectations.py (right): https://codereview.chromium.org/1136913005/diff/160001/content/test/gpu/gpu_t... content/test/gpu/gpu_tests/pixel_expectations.py:19: [ ('nvidia', 0x104a)], bug=485183) Actually, since you need to update the revision number of all of these tests, you'll have to mark them failing for all platforms. In this CL, please also increment the version numbers for all of these tets in src/content/test/gpu/page_sets/pixel_tests.py . We need to keep the duration of how long these are marked failing as short as possible. Once this is in the CQ, please prepare and send for review another CL which un-marks these as failing. https://codereview.chromium.org/1136913005/diff/160001/content/test/gpu/gpu_t... content/test/gpu/gpu_tests/pixel_expectations.py:20: pass I think you may need to remove this "pass". Did you try running the tests with this patch? https://www.chromium.org/developers/testing/gpu-testing#TOC-Running-the-GPU-T... If it runs OK then no need to remove it.
https://codereview.chromium.org/1136913005/diff/160001/content/test/gpu/gpu_t... File content/test/gpu/gpu_tests/pixel_expectations.py (right): https://codereview.chromium.org/1136913005/diff/160001/content/test/gpu/gpu_t... content/test/gpu/gpu_tests/pixel_expectations.py:19: [ ('nvidia', 0x104a)], bug=485183) On 2015/05/15 18:18:56, Ken Russell wrote: > Actually, since you need to update the revision number of all of these tests, > you'll have to mark them failing for all platforms. In this CL, please also > increment the version numbers for all of these tets in > src/content/test/gpu/page_sets/pixel_tests.py . > > We need to keep the duration of how long these are marked failing as short as > possible. Once this is in the CQ, please prepare and send for review another CL > which un-marks these as failing. Done. https://codereview.chromium.org/1136913005/diff/160001/content/test/gpu/gpu_t... content/test/gpu/gpu_tests/pixel_expectations.py:20: pass On 2015/05/15 18:18:56, Ken Russell wrote: > I think you may need to remove this "pass". Did you try running the tests with > this patch? > https://www.chromium.org/developers/testing/gpu-testing#TOC-Running-the-GPU-T... > > If it runs OK then no need to remove it. Done.
The CQ bit was checked by oshima@chromium.org to run a CQ dry run
The patchset sent to the CQ was uploaded after l-g-t-m from estade@chromium.org, mdempsky@chromium.org Link to the patchset: https://codereview.chromium.org/1136913005/#ps200001 (title: " ")
Patchset #10 (id:220001) has been deleted
Thanks. LGTM
The CQ bit was checked by oshima@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from estade@chromium.org, mdempsky@chromium.org Link to the patchset: https://codereview.chromium.org/1136913005/#ps200001 (title: " ")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1136913005/200001
Message was sent while issue was closed.
Committed patchset #9 (id:200001)
Message was sent while issue was closed.
Patchset 9 (id:??) landed as https://crrev.com/5cb0c01e4233ff3eb1e7f6f677b4cf9dae9ffaf2 Cr-Commit-Position: refs/heads/master@{#330212} |