diff options
Diffstat (limited to 'components/compositing')
-rw-r--r-- | components/compositing/build.rs | 3 | ||||
-rw-r--r-- | components/compositing/compositor.rs | 2 | ||||
-rw-r--r-- | components/compositing/compositor_thread.rs | 4 | ||||
-rw-r--r-- | components/compositing/gl.rs | 4 | ||||
-rw-r--r-- | components/compositing/lib.rs | 22 | ||||
-rw-r--r-- | components/compositing/windowing.rs | 4 |
6 files changed, 8 insertions, 31 deletions
diff --git a/components/compositing/build.rs b/components/compositing/build.rs index 54532276222..c9b97801f51 100644 --- a/components/compositing/build.rs +++ b/components/compositing/build.rs @@ -2,12 +2,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -extern crate toml; - use std::env; use std::fs::File; use std::io::{Read, Write}; use std::path::Path; +use toml; fn main() { let lockfile_path = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap()) diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index c3974c7fd01..f357f6522ee 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -263,7 +263,7 @@ impl RenderNotifier { } impl webrender_api::RenderNotifier for RenderNotifier { - fn clone(&self) -> Box<webrender_api::RenderNotifier> { + fn clone(&self) -> Box<dyn webrender_api::RenderNotifier> { Box::new(RenderNotifier::new(self.compositor_proxy.clone())) } diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index a897f141fed..a4859d58f79 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -23,7 +23,7 @@ use webrender_api::{self, DeviceIntPoint, DeviceUintSize}; /// Sends messages to the compositor. pub struct CompositorProxy { pub sender: Sender<Msg>, - pub event_loop_waker: Box<EventLoopWaker>, + pub event_loop_waker: Box<dyn EventLoopWaker>, } impl CompositorProxy { @@ -98,7 +98,7 @@ pub enum Msg { /// Runs a closure in the compositor thread. /// It's used to dispatch functions from webrender to the main thread's event loop. /// Required to allow WGL GLContext sharing in Windows. - Dispatch(Box<Fn() + Send>), + Dispatch(Box<dyn Fn() + Send>), /// Indicates to the compositor that it needs to record the time when the frame with /// the given ID (epoch) is painted and report it to the layout thread of the given /// pipeline ID. diff --git a/components/compositing/gl.rs b/components/compositing/gl.rs index 6637ef203ea..59c1225cd91 100644 --- a/components/compositing/gl.rs +++ b/components/compositing/gl.rs @@ -14,7 +14,7 @@ pub struct RenderTargetInfo { } pub fn initialize_png( - gl: &gl::Gl, + gl: &dyn gl::Gl, width: DeviceUintLength, height: DeviceUintLength, ) -> RenderTargetInfo { @@ -80,7 +80,7 @@ pub fn initialize_png( } pub fn draw_img( - gl: &gl::Gl, + gl: &dyn gl::Gl, render_target_info: RenderTargetInfo, width: DeviceUintLength, height: DeviceUintLength, diff --git a/components/compositing/lib.rs b/components/compositing/lib.rs index c631f39275e..d54feac56bb 100644 --- a/components/compositing/lib.rs +++ b/components/compositing/lib.rs @@ -4,30 +4,8 @@ #![deny(unsafe_code)] -extern crate embedder_traits; -extern crate euclid; -extern crate gfx_traits; -#[cfg(feature = "gleam")] -extern crate gleam; -#[cfg(feature = "gleam")] -extern crate image; -extern crate ipc_channel; -extern crate keyboard_types; -extern crate libc; #[macro_use] extern crate log; -extern crate msg; -extern crate net_traits; -extern crate profile_traits; -extern crate script_traits; -extern crate servo_channel; -extern crate servo_config; -extern crate servo_geometry; -extern crate servo_url; -extern crate style_traits; -extern crate time; -extern crate webrender; -extern crate webrender_api; pub use crate::compositor::IOCompositor; pub use crate::compositor::RenderNotifier; diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index 9ff7e919746..087062c3fc2 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -132,9 +132,9 @@ pub trait WindowMethods { fn prepare_for_composite(&self) -> bool; /// Return the GL function pointer trait. #[cfg(feature = "gleam")] - fn gl(&self) -> Rc<gl::Gl>; + fn gl(&self) -> Rc<dyn gl::Gl>; /// Returns a thread-safe object to wake up the window's event loop. - fn create_event_loop_waker(&self) -> Box<EventLoopWaker>; + fn create_event_loop_waker(&self) -> Box<dyn EventLoopWaker>; /// Get the coordinates of the native window, the screen and the framebuffer. fn get_coordinates(&self) -> EmbedderCoordinates; /// Set whether the application is currently animating. |