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

Issue 1903003002: mus/views: Fix creating gfx::Display in high-dpi. (Closed)

Created:
4 years, 8 months ago by sadrul
Modified:
4 years, 8 months ago
Reviewers:
sky
CC:
chromium-reviews, kalyank, sadrul, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mus/views: Fix creating gfx::Display in high-dpi. It's very easy to create a gfx::Display instance with incorrect values for bounds/work-area when device-scale factor ≠ 1. This is because when the gfx::Display is created with a specified bounds, it attempts to automatically convert the bounds from pixel to DIP values. However, work-area needs to set separately, and so the caller can use different scaling factor when setting the bounds vs. setting the work-area. To fix this, have the gfx::Display creator explicitly do the pixel-to-DIP conversion before setting the bounds and work-area on the gfx::Display instances. BUG=600815, 605124 Committed: https://crrev.com/5b115788789b08177b4f38d9a0206a6c069ec4e6 Cr-Commit-Position: refs/heads/master@{#388507}

Patch Set 1 #

Total comments: 2

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -4 lines) Patch
M ui/aura/test/aura_test_helper.cc View 1 1 chunk +5 lines, -2 lines 0 comments Download
M ui/views/mus/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/mus/screen_mus.cc View 1 chunk +12 lines, -2 lines 0 comments Download
A ui/views/mus/screen_mus_unittest.cc View 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (5 generated)
sadrul
4 years, 8 months ago (2016-04-20 02:14:35 UTC) #2
sky
https://codereview.chromium.org/1903003002/diff/1/ui/aura/test/aura_test_helper.cc File ui/aura/test/aura_test_helper.cc (right): https://codereview.chromium.org/1903003002/diff/1/ui/aura/test/aura_test_helper.cc#newcode74 ui/aura/test/aura_test_helper.cc:74: host_.reset(test_screen_->CreateHostForPrimaryDisplay()); If there is a screen will creating host_ ...
4 years, 8 months ago (2016-04-20 14:40:10 UTC) #3
sadrul
https://codereview.chromium.org/1903003002/diff/1/ui/aura/test/aura_test_helper.cc File ui/aura/test/aura_test_helper.cc (right): https://codereview.chromium.org/1903003002/diff/1/ui/aura/test/aura_test_helper.cc#newcode74 ui/aura/test/aura_test_helper.cc:74: host_.reset(test_screen_->CreateHostForPrimaryDisplay()); On 2016/04/20 14:40:10, sky wrote: > If there ...
4 years, 8 months ago (2016-04-20 14:53:17 UTC) #5
sky
LGTM
4 years, 8 months ago (2016-04-20 15:14:08 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903003002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903003002/20001
4 years, 8 months ago (2016-04-20 15:57:50 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-20 16:02:30 UTC) #10
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:23:52 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5b115788789b08177b4f38d9a0206a6c069ec4e6
Cr-Commit-Position: refs/heads/master@{#388507}

Powered by Google App Engine
This is Rietveld 408576698