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

Unified Diff: ui/base/resource/resource_bundle.cc

Issue 563713003: Avoid DCHECK on 3x scaled screens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 8d0aa5473ced23089782cdc403a27789813eb041..b499fb8cc2e90d4932044eadb6097f028f4106f0 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -606,7 +606,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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698