Implement DOM to texture

This commit is contained in:
Imanol Fernandez 2017-09-21 15:16:46 +02:00
parent a9022be0c3
commit 8ae0739bab
17 changed files with 238 additions and 13 deletions

View file

@ -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,