Hello, I didn't find a way to export frames. Just like skia's bitmap.getPixels(), can anyone help me? I hope the author can add a demo that exports png images through the frame.
You can run some code after Renderer::render which does a read-back of the framebuffer using renderer.device.read_pixels. This is what Wrench, Gecko and Servo do for reference testing.
See where Wrench does it.
When I try to open the debugger in the browser, I get an error like this. I know that my wrench has definitely not started:
index.js:12 WebSocket connection to 'ws://127.0.0.1:3583/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
I followed the startup command on wiki and found that the error is like this, then how can I start the browser debugging?
orange@orange:~/work/rust/webrender$ cd wrench/
orange@orange:~/work/rust/webrender/wrench$ cargo run show reftests/image/tile-size.yaml --features='webrender/debugger'
warning: /home/orange/work/rust/webrender/Cargo.toml: unused manifest key: patch.crates-io.serde_derive.feature
warning: /home/orange/work/rust/webrender/Cargo.toml: unused manifest key: workspace.license
Finished dev [unoptimized + debuginfo] target(s) in 0.18s
Running `/home/orange/work/rust/webrender/target/debug/wrench show reftests/image/tile-size.yaml --features=webrender/debugger`
error: Found argument '--features' which wasn't expected, or isn't valid in this context
USAGE:
wrench show [FLAGS] [OPTIONS] <INPUT>
For more information try --help
orange@orange:~/work/rust/webrender/wrench$
You need to add -- between carg run and show so that cargo forwards the dash arguments to wrench instead of trying to interpret them. I updated the wiki page.
@nical The problem still exists.
orange@orange:~/work/rust/webrender/wrench$ cargo run -- show reftests/image/tile-size.yaml --features 'webrender/debugger'
warning: /home/orange/work/rust/webrender/Cargo.toml: unused manifest key: patch.crates-io.serde_derive.feature
warning: /home/orange/work/rust/webrender/Cargo.toml: unused manifest key: workspace.license
Finished dev [unoptimized + debuginfo] target(s) in 0.18s
Running /home/orange/work/rust/webrender/target/debug/wrench show reftests/image/tile-size.yaml --features webrender/debugger
error: Found argument '--features' which wasn't expected, or isn't valid in this context
USAGE:
wrench show [FLAGS] [OPTIONS]
For more information try --help
Try dropping the --features webrender/debugger since that feature should be included in a default wrench build. But if it's needed, it would go before the -- because it's a argument for cargo
@staktrace Ok, thank you, you can run it.
I suppose the issue is resolved then. Please feel free to re-open otherwise.