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 upIntroduce frame output support. #1687
Conversation
|
r? @kvark |
|
Looks fine by me. |
| @@ -2679,17 +2746,19 @@ impl Renderer { | |||
| } | |||
|
|
|||
| for (i, texture) in self.color_render_targets.iter().chain(self.alpha_render_targets.iter()).enumerate() { | |||
| let dimensions = texture.get_dimensions(); | |||
| let src_rect = DeviceIntRect::new(DeviceIntPoint::zero(), | |||
| DeviceIntSize::new(dimensions.width as i32, | |||
This comment has been minimized.
This comment has been minimized.
| /// call succeeds, when WR has issued the GL commands to copy the output | ||
| /// to the texture handle. | ||
| pub trait OutputImageHandler { | ||
| fn lock(&mut self, pipeline_id: PipelineId) -> Option<(u32, DeviceIntSize)>; |
This comment has been minimized.
This comment has been minimized.
kvark
Sep 11, 2017
Member
we might want to revisit the lock/unlock semantics here later (is that how VR team wants to work with WR?), especially since WR pretty much guarantees that unlock is going to be called right away after some blitting (contrary to external image locks, where unlocking can happen at any time later).
This comment has been minimized.
This comment has been minimized.
glennw
Sep 11, 2017
Author
Member
The vr team have a demo working with the lock/unlock - but yes, we may want to revisit these semantics later on once we work out the exact synchronization story.
|
Oh, and I forgot to mention that this would be really nice to hook up via the document API: having VR content in a separate WR document that's routed into a separate target, as opposed to hacking the |
|
@kvark I would like to hook up to the document API too - I think the pipeline API is fine for now (allows easy prototyping in Servo). But certainly once we make better use of the document API in Servo, we could consider switching frame output to support both documents and pipelines, or switch to documents exclusively. |
|
|
|
Rebased and fixed cast nit. |
|
|
|
Ok, merging on the merit that this is going to be ported to document API later on (or at least considered :) ) |
|
|
|
|
|
|
This adds a new feature to WR, that allows copying the output of a given pipeline ID to an external texture. This is a feature request from the webvr prototyping team. The included example demonstrates how to use the API to copy the output of an iframe to an external texture, which is then copied onto the screen via custom GL commands.
|
Rebased. @bors-servo r=kvark |
|
|
Introduce frame output support. This adds a new feature to WR, that allows copying the output of a given pipeline ID to an external texture. This is a feature request from the webvr prototyping team. The included example demonstrates how to use the API to copy the output of an iframe to an external texture, which is then copied onto the screen via custom GL commands. <!-- 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/1687) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Introduce frame output support. This adds a new feature to WR, that allows copying the output of a given pipeline ID to an external texture. This is a feature request from the webvr prototyping team. The included example demonstrates how to use the API to copy the output of an iframe to an external texture, which is then copied onto the screen via custom GL commands. <!-- 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/1687) <!-- Reviewable:end -->
|
|
glennw commentedSep 11, 2017
•
edited by larsbergstrom
This adds a new feature to WR, that allows copying the output
of a given pipeline ID to an external texture. This is a feature
request from the webvr prototyping team.
The included example demonstrates how to use the API to copy the
output of an iframe to an external texture, which is then copied
onto the screen via custom GL commands.
This change is