mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #18592 - MortimerGoro:dom_texture, r=jdm
Implement DOM to texture <!-- Please describe your changes on the following line: --> This is a prototype of the WebGL DOMToTexture feature. The API should be fine as a privileged extension for now due to security concerns. The working group has been investigating the viability of unprivileged usage but the spec is not ready yet. Demo video: https://www.youtube.com/watch?v=hpZqEM5hPao --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18592) <!-- Reviewable:end -->
This commit is contained in:
commit
3209d22968
17 changed files with 238 additions and 13 deletions
|
@ -553,13 +553,18 @@ fn create_constellation(user_agent: Cow<'static, str>,
|
|||
};
|
||||
|
||||
// Initialize WebGL Thread entry point.
|
||||
let (webgl_threads, image_handler) = WebGLThreads::new(gl_factory,
|
||||
window_gl,
|
||||
webrender_api_sender.clone(),
|
||||
webvr_compositor.map(|c| c as Box<_>));
|
||||
let (webgl_threads, image_handler, output_handler) = WebGLThreads::new(gl_factory,
|
||||
window_gl,
|
||||
webrender_api_sender.clone(),
|
||||
webvr_compositor.map(|c| c as Box<_>));
|
||||
// Set webrender external image handler for WebGL textures
|
||||
webrender.set_external_image_handler(image_handler);
|
||||
|
||||
// Set DOM to texture handler, if enabled.
|
||||
if let Some(output_handler) = output_handler {
|
||||
webrender.set_output_image_handler(output_handler);
|
||||
}
|
||||
|
||||
let initial_state = InitialConstellationState {
|
||||
compositor_proxy,
|
||||
embedder_proxy,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue