-
Couldn't load subscription status.
- Fork 301
WebRender in Firefox
Markus Stange edited this page Oct 12, 2017
·
17 revisions
This process is described in README.webrende in mozilla-central.
There is an environment variable for Firefox called ENABLE_WR_RECORDING which will cause Firefox to create binary recording files in the directory that you started Firefox from. These binary recordings can be converted into YAML frames using wrench.
- Start Firefox with
ENABLE_WR_RECORDING=1, e.g.$ ENABLE_WR_RECORDING=1 mach run -P your-firefox-profile-that-has-webrender-enabled
- Open the website or testcase that you're interested in.
- Close Firefox.
- Locate the binary recording file. There's one per window, the filename has the pattern
wr-record-<window number>.bin. - Go to your clone of the webrender repository, or create a clone of it if you don't have one.
- Check out the revision of webrender that your Firefox is based on. This revision is recorded in the last line of
gfx/doc/README.webrenderin your Firefox checkout. (This is necessary because the binary recording format is unstable.) - Go to the wrench directory in your webrender checkout, and run the following command:
$ cargo run --release -- --save yaml replay /path/to/wr-record-1.bin- This might take a few minutes to compile.
- A window will open, and it will display the contents of the Firefox window that was recorded.
- Press the right arrow key until you see the frame that you're interested in. You can step forwards and backwards using the arrow keys (stepping backwards will show a warning).
- Press the escape key in order to close the wrench viewer, or step forwards until the end of the recording and watch wrench panic.
- Now there is a directory called
yaml_framesinside the wrench directory that you're in. Theyaml_framesdirectory contains oneframe-<framenumber>.ymlfile per frame, and aresdirectory which contains image and font files. - You can display just the frame that you care about using
$ cargo run --release -- show yaml_frames/frame-14.yaml- If the frame is rendered with the wrong scale, try passing
-p 1or-p 2to the command, e.g.
$ cargo run --release -- -p 1 show yaml_frames/frame-14.yaml