Commit 879fc233 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Enable png->webp optimization for Chrome.apk

This is now safe to do for all of our apks since we don't support
JellyBean anymore.

Bug: 993342
Change-Id: I670a0d54e6b524c6fa21f712efc6214a04c74bb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1752102
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686496}
parent 2da3e7d6
...@@ -1606,12 +1606,6 @@ template("chrome_public_apk_or_module_tmpl") { ...@@ -1606,12 +1606,6 @@ template("chrome_public_apk_or_module_tmpl") {
shared_libraries = [ ":libchrome" ] shared_libraries = [ ":libchrome" ]
# Android supports webp transparent resources properly since API level 18,
# so this can only be activated for modern ones (which target API >= 21).
# TODO(digit): Turn this on for all builds once JellyBean support is
# dropped in the future.
png_to_webp = _is_modern && !is_java_debug
# Native libraries can be loaded directly from the APK using the # Native libraries can be loaded directly from the APK using the
# Chromium linker. However, we disable this for J-K due to an OEM-specific # Chromium linker. However, we disable this for J-K due to an OEM-specific
# platform bug, where overzealous SELinux settings prevent mapping some apk # platform bug, where overzealous SELinux settings prevent mapping some apk
...@@ -1926,6 +1920,9 @@ template("chrome_test_apk_tmpl") { ...@@ -1926,6 +1920,9 @@ template("chrome_test_apk_tmpl") {
proguard_enabled = true proguard_enabled = true
proguard_configs = [ "//chrome/android/java/apk_for_test.flags" ] proguard_configs = [ "//chrome/android/java/apk_for_test.flags" ]
} }
# TODO(crbug.com/993340): Update test goldens with webp versions of images.
png_to_webp = false
} }
} }
......
...@@ -173,6 +173,13 @@ template("chrome_public_common_apk_or_module_tmpl") { ...@@ -173,6 +173,13 @@ template("chrome_public_common_apk_or_module_tmpl") {
support_zh_hk = true support_zh_hk = true
} }
# Android supports webp transparent resources properly since API level 18,
# so this can only be activated for modern ones (which target API >= 21).
if (!defined(png_to_webp)) {
png_to_webp = !is_java_debug
}
# Removes metadata needed for Resources.getIdentifier("resource_name").
strip_resource_names = !is_java_debug strip_resource_names = !is_java_debug
# TODO(753402): enable once aapt2>=3.6.0 and bundletool>0.9.0 are rolled in. # TODO(753402): enable once aapt2>=3.6.0 and bundletool>0.9.0 are rolled in.
...@@ -449,7 +456,6 @@ template("monochrome_public_common_apk_or_module_tmpl") { ...@@ -449,7 +456,6 @@ template("monochrome_public_common_apk_or_module_tmpl") {
if (is_monochrome) { if (is_monochrome) {
proguard_configs += [ "//android_webview/apk/java/proguard.flags" ] proguard_configs += [ "//android_webview/apk/java/proguard.flags" ]
} }
png_to_webp = true
} }
if (!defined(deps)) { if (!defined(deps)) {
......
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