Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[RFC, alpha] Capturing infrastructure #2232
Conversation
|
Reviewed 20 of 20 files at r1. webrender_api/Cargo.toml, line 11 at r1 (raw file):
I'm not sure about the naming of this - perhaps we can either come up with something a bit more descriptive or add a comment explaining what this feature provides? webrender_api/src/display_item.rs, line 58 at r1 (raw file):
Do we need @gankro or @jrmuizel to check that this won't have any bad side effects on serde codegen for (de)serialization times? Comments from Reviewable |
|
A couple of very minor comments, otherwise this looks great to me. |
external texture buffer support renamed WR API feature to "debug-serialization"
|
@glennw thanks for the review! |
|
@kvark r=me if you want to get this merged now then, or we can revisit if there are still more commits to come first. |
|
@glennw thank you! |
|
I've only skimmed it but it seems fine to me. |
|
@jrmuizel please take a look at the last commit with an extra raw test, as requested. Afterwards, it should be ready to sail. |
|
Looks good to me. |
|
Alright-y, thanks everyone who looked at the code! |
|
|
[RFC, alpha] Capturing infrastructure As we start re-focusing on the correctness issues, it becomes vital to be able to capture a bug and replay it in a reduced standalone environment. Unfortunately, the current binary/player infrastructure does not provide a solid way to achieve that, see #2231. Changes to existing logic: - internal representation of `Document` on the WR backend side is changed to have a new `DocumentView` item. - `BuiltDisplayList/DisplayItemRef` serialization (used for JSON/RON) is rewritten to use stronger typing (with `CompletelySpecificDisplayItem` enum) and consistent/robust code. Result also looks a bit better now, since items have less nesting. - WR API got "debug-serialization" feature, and WR itself got "capture" feature New API calls: - `save_capture(path)` - `load_capture(path)` - still not sure if we might instead just always create a new WR backend instead of trying to overwrite the current state with a capture (comments are welcome!) - In the examples, we can now hit 'C' to save a capture or load one, if it's already at "captures/example". Here is what a capture looks like on disk:  This is just the start. What will follow is a series of issues/PRs to extend the function in the following ways: 1. full external/blob image serialization (this is the biggest piece missing to call this a "beta"). Currently, the following paths are incomplete: - #2236: tiled blobs - #2237: external GL textures 2. #2234: storing images as PNG 3. #2235: supporting other serial formats for the scenes, like JSON, with configurable pretty-printing 4. wrench integration, removal of the existing JSON/RON writers 5. #2238, #2239: more exciting stuff ;) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2232) <!-- Reviewable:end -->
|
|
kvark commentedDec 18, 2017
•
edited
As we start re-focusing on the correctness issues, it becomes vital to be able to capture a bug and replay it in a reduced standalone environment. Unfortunately, the current binary/player infrastructure does not provide a solid way to achieve that, see #2231.
Changes to existing logic:
Documenton the WR backend side is changed to have a newDocumentViewitem.BuiltDisplayList/DisplayItemRefserialization (used for JSON/RON) is rewritten to use stronger typing (withCompletelySpecificDisplayItemenum) and consistent/robust code. Result also looks a bit better now, since items have less nesting.New API calls:
save_capture(path)load_capture(path)- still not sure if we might instead just always create a new WR backend instead of trying to overwrite the current state with a capture (comments are welcome!)Here is what a capture looks like on disk:

This is just the start. What will follow is a series of issues/PRs to extend the function in the following ways:
This change is