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 upCapture infrastructure, part 2.5 #2326
Conversation
|
The main problem I had with Gecko was caused by the fact I used to issue a capture from the Browser Console, which is in turn a window also using WR, so all the captured data was messed up. When capturing with a key combination (thanks to @mstange for help setting this up), wrench shows the captured FF frame just fine: With this in, the PR is ready for review. I'm going to follow up with the FF patch and a gecko try push before this is merged. |
|
Reviewed 36 of 36 files at r1. webrender/src/capture.rs, line 72 at r1 (raw file):
Could you expand on what the TODO here means? webrender/src/capture.rs, line 104 at r1 (raw file):
What does channel_index refer to here? webrender/src/renderer.rs, line 494 at r1 (raw file):
I think so, yep (doesn't need to be in this PR). Comments from Reviewable |
|
@kvark Looks good! r=me once those minor comments are addressed, and try is green. |
|
@glennw thanks for taking a look! The try push shows some JS errors that may be related to the JS code I put in (unlikely though) but have nothing to do with WR side of things, so I consider it green for the matter of this PR (unless @staktrace says otherwise ;) ). |
Wrench: window size refactor
|
@bors-servo r=glennw |
|
|
|
The try push looks good to me |
Capture infrastructure, part 2.5 The PR rewrites the way capturing interacts with external images and buffers. For the matter of consistency with the frame-level capturing, and respecting the given UV ranges, the external stuff now goes through an extra level of indirection: - Old: "scene-1-0.ron" -> "blobs/4.raw" - New: "scene-1-0.ron" -> "externals/4.ron" -> "externals/t2.raw" This ~~is a WIP for early feedback about the refactor/API changes,~~ comes with absolutely no warranty! Ultimately, the PR ~~will be ready when replaying a capture from Gecko works~~ edit: is ready🎉 . Public API changes: - `TexelRect` is exposed and used in `ExternalImage` - `TextureTarget` is exposed and used in `ExternalImageType` - `wrench` compact profiler key is now "S" (same as the examples use), while "C" is reserved for capturing The PR also contains a bunch of internal refactoring to drop some of the technological debt accumulated, including but not limited to: - use of strongly typed `RectWithEndpoint` in `ImageResource` GLSL code - private contents of `GpuBlockData`, better conversions to it - more use of `Self` in method returns, plus some associated constants - simplification of a quite a bit of conversion code thanks to the public API changes ^ - wrench window size handling is streamlined a bit, it's also getting re-sized on capture load <!-- 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/2326) <!-- Reviewable:end -->
|
|
|
Please not that this is not the end of story. I noticed some external images not showing up in Gecko captures, so I'll follow up with more fixes. This PR main goal is to have the Gecko integration finally set up, and I'm sure it's helpful in the current shape already. |

kvark commentedJan 19, 2018
•
edited
The PR rewrites the way capturing interacts with external images and buffers. For the matter of consistency with the frame-level capturing, and respecting the given UV ranges, the external stuff now goes through an extra level of indirection:
This🎉 .
is a WIP for early feedback about the refactor/API changes,comes with absolutely no warranty! Ultimately, the PRwill be ready when replaying a capture from Gecko worksedit: is readyPublic API changes:
TexelRectis exposed and used inExternalImageTextureTargetis exposed and used inExternalImageTypewrenchcompact profiler key is now "S" (same as the examples use), while "C" is reserved for capturingThe PR also contains a bunch of internal refactoring to drop some of the technological debt accumulated, including but not limited to:
RectWithEndpointinImageResourceGLSL codeGpuBlockData, better conversions to itSelfin method returns, plus some associated constantsThis change is