diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2019-07-26 16:52:23 -0500 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2019-07-26 17:39:40 -0500 |
commit | 0178fcae4ec29824a3f1d35969457bed1ca104e9 (patch) | |
tree | 0e624cc98fbbfb9e70ed107e0f1a7391aa30e52f /components/servo/lib.rs | |
parent | 8ec28978cdc3e0fa66652a7a0a57911ca414254c (diff) | |
download | servo-0178fcae4ec29824a3f1d35969457bed1ca104e9.tar.gz servo-0178fcae4ec29824a3f1d35969457bed1ca104e9.zip |
When using the WebGL external image API, use sync calls if we happen to be on the WebGL thread
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r-- | components/servo/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs index a6c3e7aa460..d94700f11fe 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -227,7 +227,7 @@ pub struct Servo<Window: WindowMethods + 'static + ?Sized> { embedder_receiver: EmbedderReceiver, embedder_events: Vec<(Option<BrowserId>, EmbedderMsg)>, profiler_enabled: bool, - webgl_thread_data: Option<WebGLMainThread>, + webgl_thread_data: Option<Rc<WebGLMainThread>>, } #[derive(Clone)] @@ -420,13 +420,14 @@ where let webgl_result = gl_factory.map(|factory| { let (webgl_threads, thread_data, image_handler, output_handler) = WebGLThreads::new( factory, + window.gl(), webrender_api_sender.clone(), webvr_compositor.map(|c| c as Box<_>), external_images.clone(), if run_webgl_on_main_thread { ThreadMode::MainThread(embedder.create_event_loop_waker()) } else { - ThreadMode::OffThread(window.gl()) + ThreadMode::OffThread }, ); |