Commit e16fd728 authored by lliabraa's avatar lliabraa Committed by Commit bot

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}
parent 1a1619de
...@@ -608,7 +608,12 @@ void ResourceBundle::InitSharedInstance(Delegate* delegate) { ...@@ -608,7 +608,12 @@ void ResourceBundle::InitSharedInstance(Delegate* delegate) {
supported_scale_factors.push_back(closest); supported_scale_factors.push_back(closest);
#elif defined(OS_IOS) #elif defined(OS_IOS)
gfx::Display display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); 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()); DCHECK_EQ(2.0, display.device_scale_factor());
supported_scale_factors.push_back(SCALE_FACTOR_200P); supported_scale_factors.push_back(SCALE_FACTOR_200P);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment