Commit de1a884a authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Tell grit 2x scale is supported when enable_hidpi is set.

To avoid decreasing the supported platforms from today, this expands
enable_hidpi from Linux (incl. CrOS)/Mac/Win to also include iOS.

Bug: 564112
Change-Id: I246ea0dd25d93a174195489c2e388e3c7a890e8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670357
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarRobert Flack <flackr@chromium.org>
Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672639}
parent 7aea0166
......@@ -98,6 +98,7 @@ import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//build/toolchain/gcc_toolchain.gni") # For enable_resource_whitelist_generation
import("//third_party/closure_compiler/closure_args.gni")
import("//ui/base/ui_features.gni")
if (enable_resource_whitelist_generation) {
assert(target_os == "android" || target_os == "win",
"unsupported platform for resource whitelist generation")
......@@ -108,6 +109,13 @@ if (enable_resource_whitelist_generation) {
grit_defines = []
if (enable_hidpi) {
grit_defines += [
"-D",
"scale_factors=2x",
]
}
# Mac and iOS want Title Case strings.
use_titlecase_in_grd_files = is_mac || is_ios
if (use_titlecase_in_grd_files) {
......@@ -137,8 +145,6 @@ if (is_chromeos) {
grit_defines += [
"-D",
"chromeos",
"-D",
"scale_factors=2x",
]
}
......@@ -184,13 +190,6 @@ if (is_android) {
]
}
if (is_mac || is_ios) {
grit_defines += [
"-D",
"scale_factors=2x",
]
}
# When cross-compiling, explicitly pass the target system to grit.
if (current_toolchain != host_toolchain) {
if (is_android) {
......
......@@ -12,7 +12,7 @@ declare_args() {
has_native_accessibility = use_atk || is_win || is_mac
# Whether the message center should be included for displaying notifications.
enable_message_center = is_win || is_mac || is_linux || is_chromeos
enable_message_center = is_win || is_mac || is_linux
}
enable_hidpi = is_mac || is_win || is_linux
enable_hidpi = is_mac || is_win || is_linux || is_ios
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