mirror of
https://github.com/servo/servo.git
synced 2025-06-23 08:34:42 +01:00
Update WR (remove internal webgl implementation).
This commit is contained in:
parent
90a75d41b7
commit
73fe2f0e96
3 changed files with 29 additions and 52 deletions
|
@ -19,6 +19,6 @@ gleam = "0.4"
|
|||
ipc-channel = "0.8"
|
||||
log = "0.3.5"
|
||||
num-traits = "0.1.32"
|
||||
offscreen_gl_context = { version = "0.11", features = ["serde"] }
|
||||
offscreen_gl_context = { version = "0.11", features = ["serde", "osmesa"] }
|
||||
webrender = {git = "https://github.com/servo/webrender"}
|
||||
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
||||
|
|
|
@ -327,17 +327,6 @@ impl webrender_api::RenderNotifier for RenderNotifier {
|
|||
}
|
||||
}
|
||||
|
||||
// Used to dispatch functions from webrender to the main thread's event loop.
|
||||
struct CompositorThreadDispatcher {
|
||||
compositor_proxy: CompositorProxy
|
||||
}
|
||||
|
||||
impl webrender_api::RenderDispatcher for CompositorThreadDispatcher {
|
||||
fn dispatch(&self, f: Box<Fn() + Send>) {
|
||||
self.compositor_proxy.send(Msg::Dispatch(f));
|
||||
}
|
||||
}
|
||||
|
||||
impl<Window: WindowMethods> IOCompositor<Window> {
|
||||
fn new(window: Rc<Window>, state: InitialCompositorState)
|
||||
-> IOCompositor<Window> {
|
||||
|
@ -394,15 +383,6 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
compositor.constellation_chan.clone());
|
||||
compositor.webrender.set_render_notifier(Box::new(render_notifier));
|
||||
|
||||
if cfg!(target_os = "windows") {
|
||||
// Used to dispatch functions from webrender to the main thread's event loop.
|
||||
// Required to allow WGL GLContext sharing in Windows.
|
||||
let dispatcher = Box::new(CompositorThreadDispatcher {
|
||||
compositor_proxy: compositor.channel_to_self.clone_compositor_proxy()
|
||||
});
|
||||
compositor.webrender.set_main_thread_dispatcher(dispatcher);
|
||||
}
|
||||
|
||||
// Set the size of the root layer.
|
||||
compositor.update_zoom_transform();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue