Instanciate and use the implemented webrender::ExternalImageHandler

This commit is contained in:
Víctor Manuel Jáquez Leal 2019-06-14 14:41:36 +02:00 committed by Fernando Jiménez Moreno
parent e000c14eb2
commit a9ad088e70
2 changed files with 12 additions and 5 deletions

View file

@ -13,9 +13,11 @@ use euclid::Size2D;
pub struct GLPlayerThreads(GLPlayerSender<GLPlayerMsg>);
impl GLPlayerThreads {
pub fn new() -> GLPlayerThreads {
pub fn new() -> (GLPlayerThreads, Box<dyn webrender::ExternalImageHandler>) {
let channel = GLPlayerThread::start();
GLPlayerThreads(channel)
let external =
GLPlayerExternalImageHandler::new(GLPlayerExternalImages::new(channel.clone()));
(GLPlayerThreads(channel), Box::new(external))
}
/// Gets the GLPlayerThread handle for each script pipeline.