53
edits
No edit summary |
No edit summary |
||
| Line 614: | Line 614: | ||
Apitrace is a tool for tracing GL/EGL calls for debugging purposes. It basically uses an interim shared library called libapitrace that contains shadow gl* and egl* functions, which then get logged and then passed through to the real driver. | Apitrace is a tool for tracing GL/EGL calls for debugging purposes. It basically uses an interim shared library called libapitrace that contains shadow gl* and egl* functions, which then get logged and then passed through to the real driver. | ||
Use apitrace from https://github.com/gw280/apitrace (branch android) to build for desktop and android. | |||
Use apitrace from https://github.com/gw280/apitrace (branch android) | |||
<pre> | <pre> | ||
| Line 640: | Line 621: | ||
git clone https://github.com/gw280/apitrace.git | git clone https://github.com/gw280/apitrace.git | ||
cd apitrace | cd apitrace | ||
# Build for Android | |||
export ANDROID_NDK=/path/to/your/ndk | |||
cmake -DCMAKE_TOOLCHAIN_FILE=android/android.toolchain.cmake -DANDROID_API_LEVEL=9 -Bbuild-android -H. | |||
make -C build-android -j8 | |||
# Build for desktop | |||
cmake -H. -Bbuild | cmake -H. -Bbuild | ||
make -C build -j8 | make -C build -j8 | ||
export EGL_SOFTWARE=true | export EGL_SOFTWARE=true | ||
./build/eglretrace -v /path/to/your/apitrace_log.trace | ./build/eglretrace -v /path/to/your/apitrace_log.trace | ||
</pre> | </pre> | ||
The Android build will create egltrace.so in build-android/wrappers, which you can then push to your device to /data/local: | |||
<pre> | |||
adb push build-android/wrappers/egltrace.so /data/local | |||
</pre> | |||
Restarting Fennec will cause it to load the apitrace library and the apitrace log will be saved to /data/data/org.mozilla.fennec_username/firefox.trace | |||
You can then adb pull /data/data/org.mozilla.fennec_username/firefox.trace and analyse it on your desktop. | |||
You can also use qapitrace as a GUI to inspect your trace files. | You can also use qapitrace as a GUI to inspect your trace files. | ||
edits