What are the gn parameters for the official compilation of TrichromeLibrary.apk?

268 views
Skip to first unread message

mars pluto

unread,
May 20, 2024, 11:49:37 AMMay 20
to android-webview-dev

1. TrichromeLibrary.apk compiled by autoninja -C out/Default trichrome_webview_apk will cause SVG misalignment under certain circumstances.

The gn args I use are as follows:

target_os = "android"
target_cpu = "arm"       # or "arm", "x86", or "x64"; see below

# Create an official release build. Only official builds should be distributed
# to users, as non-official builds are intended for development and may not
# be configured appropriately for production.
is_debug = false
is_official_build = true

# Use the default production settings for field trials, instead of the testing
# defaults.
disable_fieldtrial_testing_config = true

# WebView's efficient native library loading mechanism is not compatible with
# component builds of Chromium.
is_component_build = false
debuggable_apks = false

# Disable Google-specific branding/features
is_chrome_branded = false
use_official_google_api_keys = false

# May disable some experimental (unstable) features. Hides WebView DevTools
# (a debugging tool most users won't need to access).
android_channel = "stable"
chrome_pgo_phase = 0

proprietary_codecs = true
ffmpeg_branding = "Chrome"

symbol_level = 0
system_webview_package_name = "com.google.android.webview.canary"

use_static_angle = true

Nate Fischer

unread,
May 20, 2024, 1:21:41 PMMay 20
to mars pluto, android-webview-dev
Have you seen https://chromium.googlesource.com/chromium/src/+/HEAD/android_webview/docs/aosp-system-integration.md yet? This is our guide for what GN args to use to compile an optimized build which is suitable for release. This will differ slightly from how we compile the WebView builds that are available on the Play Store, but it should still be optimized and have most of the things you want.

I would not advise changing any GN args beyond what is documented on that page. It looks like you've also changed 'use_static_angle'. We don't usually change this option, so you should try ruling out whether that's the issue.

If you can reproduce the issue using the exact set of GN args we documented, please file a bug and explain exactly how to reproduce the issue (ex. we need a link to a web page that has SVGs exhibiting this problem). https://issues.chromium.org/issues/new?component=1456456&template=1923373
Nate Fischer | Software Engineer | ntf...@google.com



--
You received this message because you are subscribed to the Google Groups "android-webview-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-webview...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/android-webview-dev/d0414a8a-bb1b-4642-951f-57b22231f817n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages