diff options
author | lliabraa <lliabraa@chromium.org> | 2014-09-11 11:51:43 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-11 19:07:06 +0000 |
commit | e16fd72864e815f3e952c29acf99b1bf6d438e86 (patch) | |
tree | fc75fe4b160397c5ba13f050e4f19e5bc77bed1f /ui/base | |
parent | 1a1619de22ee345e7f44e343fa1b94f1f048f2a2 (diff) | |
download | chromium_src-e16fd72864e815f3e952c29acf99b1bf6d438e86.zip chromium_src-e16fd72864e815f3e952c29acf99b1bf6d438e86.tar.gz chromium_src-e16fd72864e815f3e952c29acf99b1bf6d438e86.tar.bz2 |
Avoid DCHECK on 3x scaled screens.
As a temporary solution, use 2x assets on 3x screens.
BUG=413300
Review URL: https://codereview.chromium.org/563713003
Cr-Commit-Position: refs/heads/master@{#294434}
Diffstat (limited to 'ui/base')
-rw-r--r-- | ui/base/resource/resource_bundle.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc index 040cf17..ea47d0e 100644 --- a/ui/base/resource/resource_bundle.cc +++ b/ui/base/resource/resource_bundle.cc @@ -608,7 +608,12 @@ void ResourceBundle::InitSharedInstance(Delegate* delegate) { supported_scale_factors.push_back(closest); #elif defined(OS_IOS) gfx::Display display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); - if (display.device_scale_factor() > 1.0) { + if (display.device_scale_factor() > 2.0) { + DCHECK_EQ(3.0, display.device_scale_factor()); + // TODO(lliabraa): Add 3x images instead of using 2x on 3x screens. + // crbug.com/413300 + supported_scale_factors.push_back(SCALE_FACTOR_200P); + } else if (display.device_scale_factor() > 1.0) { DCHECK_EQ(2.0, display.device_scale_factor()); supported_scale_factors.push_back(SCALE_FACTOR_200P); } else { |