Platform/GFX/LayerScope
Jump to navigation
Jump to search
Layer Scope
Description
Vlad wrote:
- While debugging a bug last week, I wrote a thing I'm calling LayerScope. It does real-time dumping of data from a layer manager. I did the initial implementation in the OGL layer manager, dumping relevant texture data from the various layers in the b2g compositor process. Hasn't been tested anywhere else, but should also work fine for Android. The same approach can be expanded out to other layers backends.
Enabling Layer Scope
Desktop: go to about:config and set gfx.layerscope.enabled to true.
- Note: On linux, please also set layers.offmainthreadcomposition.enabled (enabled by default on Mac) and layers.acceleration.force-enabled to true. However, you don't have to change these two configs on Mac.
B2G: run ./edit-prefs.sh and add
user_pref("gfx.layerscope.enabled", true); user_pref("network.gonk.manage-offline-status", false);
Save and exit.
Application
- LayerScope Viewer
- LayerScope Viewer by google protocol buffer (after 2014/07/12) (Changeset)
Connecting to Layer Scope
NOTE!: from changeset [1] we removed dependency of websockify.
For the implementation, it creates a websocket where it sends some simple framed data to. Just using the viewer tool to view the data.
Desktop Example: To connect to local layerscope
Replace ws://192.168.112.129:23456 with ws://localhost:23456, and press connect.
Note: If you want to change gfx.layerscope.port on your nightly browser, please revise the connection address, for example, set the port to 23457, and then use the address ws://localhost:23457 on the layerscope tool page.
B2G Example: You need to find the address of your B2G device. To that effect, you can do:
adb shell netcfg
Replace ws://192.168.112.129:23456 with address of B2G device, and press connect
Note: Or you can do "adb forward tcp:23456 tcp:23456", the first argument is the host port and the second one is the target port. And then, just press connect to ws://localhost:23456