Changes

Jump to: navigation, search

Platform/GFX/Quantum Render

4,475 bytes added, 16:41, 23 November 2018
Add android documentation stuffs
The integration branches (inbound and autoland) run a subset of QuantumRender tests on every push. The mozilla-central branch runs all that, plus a few extra tests that are not yet marked as tier-1.
 
== Android ==
 
First note that WR on Android is still in the early stages of development and testing, so expect bugs.
 
On Android, WR can only be enabled on GeckoView-based products. In particular it *cannot* be enabled on Firefox for Android (aka Fennec), since it is not GeckoView-based. Some GeckoView products are the [https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/geckoview_example GeckoView Example app] (aka GVE, built from mozilla-central, similar to Fennec), the [https://github.com/mozilla-mobile/reference-browser Reference Browser] (built via TaskCluster/Github integration), and [https://github.com/mozilla-mobile/focus-android/ Firefox Focus] (which currently uses a pinned version of Gecko from the beta channel, so not really helpful for WR development/testing).
 
If you just want to run with WR enabled, the reference browser gives you a better experience - download the [https://tools.taskcluster.net/index/project.mobile.reference-browser.nightly/latest latest APK] for your architecture, set <tt>gfx.webrender.all</tt> to true in <tt>about:config</tt>, and restart the browser. The rest of these instructions apply to the GeckoView Example App, which is the most useful for development purposes.
 
=== Building ===
 
To build GVE, follow the instructions for setting up your mozconfig from the [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build Firefox for Android build instructions], and then run <tt>./mach build && ./mach package && ./mach android install-geckoview_example</tt> to build and install. You will need to enable WR by setting <tt>gfx.webrender.all</tt> to true either via <tt>about:config</tt> or in a [[Platform/Platform-specific_build_defines#Prefs_files prefs file]] that is used by GeckoView. If you change any Rust/C++ code, you need to re-run <tt>./mach build binaries && ./mach package && ./mach android install-geckoview_example</tt> to get the updates on-device.
 
=== Debugging ===
 
The Android Studio instructions on the [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build#Developing_Firefox_for_Android_in_Android_Studio build instructions] page work for the GeckoView Example App, as long as you choose the "geckoview_example" run configuration instead of the "app" run configuration. Debugging of Java and C++ code works in both the parent process and the content process, if you add this to your <tt>~/.lldbinit</tt> file:
 
settings append target.exec-search-paths /path/to/objdir/toolkit/library
settings append target.exec-search-paths /path/to/objdir/mozglue/build
 
You need this because there's no way in Android Studio currently to tell the content-process instance of lldb about the search paths (the UI pane only applies to the parent-process instance of lldb). Also note that when doing native code debugging with lldb, you'll hit a "segfault" at [https://searchfox.org/mozilla-central/rev/20df68a5f5b5e078a11fa62a681f09debda61d79/mozglue/linker/ElfLoader.cpp#1283 this line] on startup; this is expected and can be ignored. {{bug|1506009}} tracks Rust code debugging, which has not yet been tested extensively.
 
=== Bisecting ===
 
<tt>mozregression</tt> now also supports <tt>gve</tt> as a product, so it can be used to bisect regressions in WR on Android. An example bisection command:
 
./mach mozregression -n gve --good 2018-11-10 --pref gfx.webrender.all:true
 
=== Captures ===
 
Once {{bug|1508652}} lands, it will be possible to get WR captures from GeckoView-based products that have WR enabled. To trigger the capture, you need to run the product (e.g. GVE) with the <tt>devtools.remote.usb.enabled</tt> pref enabled, and use <tt>Web Developer > WebIDE</tt> in Firefox desktop to connect to the phone. In the "Main Process" browser console, run this command:
 
window.windowUtils.wrCapture();
 
This will tell WR to generate a capture, which will be saved to the filesystem. The path (which is something like <tt>/storage/emulated/0/Android/data/org.mozilla.geckoview_example/files/wr-capture</tt>, but may vary by device and Android version) will be printed to logcat, so you can view it by running <tt>adb logcat</tt>. To pull the capture off the device onto your local system, run <tt>adb pull /path/to/wr-capture</tt>, where the path is what was printed to logcat. This should download the entire folder, which you can then load in wrench as usual.
== Further reading ==
Confirm
586
edits

Navigation menu