diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-11-06 13:38:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-06 13:38:52 -0500 |
commit | 6878dbbbeaa59b21a7b3608b6d6a911e88c1e443 (patch) | |
tree | f4a13f7d59c7f72c51e30755d1097595764f96c0 /components/compositing | |
parent | 8df38f5e29d0005b792d403c3c54d35748448100 (diff) | |
parent | 8757cf5bc084ee23db643e283ca7e9fef143d810 (diff) | |
download | servo-6878dbbbeaa59b21a7b3608b6d6a911e88c1e443.tar.gz servo-6878dbbbeaa59b21a7b3608b6d6a911e88c1e443.zip |
Auto merge of #22086 - servo:2018-without-stylo, r=SimonSapin
Switch some crates to the 2018 edition
This is the subset of https://github.com/servo/servo/pull/22083 that doesn’t affect Gecko at all, so it isn’t blocked.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22086)
<!-- Reviewable:end -->
Diffstat (limited to 'components/compositing')
-rw-r--r-- | components/compositing/Cargo.toml | 1 | ||||
-rw-r--r-- | components/compositing/compositor.rs | 22 | ||||
-rw-r--r-- | components/compositing/compositor_thread.rs | 4 | ||||
-rw-r--r-- | components/compositing/lib.rs | 8 |
4 files changed, 18 insertions, 17 deletions
diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index 2da835c463f..ed991671c9f 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -3,6 +3,7 @@ name = "compositing" version = "0.0.1" authors = ["The Servo Project Developers"] license = "MPL-2.0" +edition = "2018" publish = false build = "build.rs" diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 4282b1a5c1f..175fbaf5ed8 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -2,15 +2,17 @@ * 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/. */ -use CompositionPipeline; -use SendableFrameTree; -use compositor_thread::{CompositorProxy, CompositorReceiver}; -use compositor_thread::{InitialCompositorState, Msg}; +use crate::CompositionPipeline; +use crate::SendableFrameTree; +use crate::compositor_thread::{CompositorProxy, CompositorReceiver}; +use crate::compositor_thread::{InitialCompositorState, Msg}; +#[cfg(feature = "gleam")] +use crate::gl; +use crate::touch::{TouchHandler, TouchAction}; +use crate::windowing::{self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods}; use euclid::{TypedPoint2D, TypedVector2D, TypedScale}; use gfx_traits::Epoch; #[cfg(feature = "gleam")] -use gl; -#[cfg(feature = "gleam")] use image::{DynamicImage, ImageFormat}; use ipc_channel::ipc; use libc::c_void; @@ -18,7 +20,7 @@ use msg::constellation_msg::{PipelineId, PipelineIndex, PipelineNamespaceId}; use net_traits::image::base::Image; #[cfg(feature = "gleam")] use net_traits::image::base::PixelFormat; -use profile_traits::time::{self, ProfilerCategory, profile}; +use profile_traits::time::{self as profile_time, ProfilerCategory, profile}; use script_traits::{AnimationState, AnimationTickType, ConstellationMsg, LayoutControlMsg}; use script_traits::{MouseButton, MouseEventType, ScrollState, TouchEventType, TouchId}; use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType}; @@ -36,11 +38,9 @@ use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor}; use style_traits::cursor::CursorKind; use style_traits::viewport::ViewportConstraints; use time::{now, precise_time_ns, precise_time_s}; -use touch::{TouchHandler, TouchAction}; use webrender; use webrender_api::{self, DeviceIntPoint, DevicePoint, HitTestFlags, HitTestResult}; use webrender_api::{LayoutVector2D, ScrollLocation}; -use windowing::{self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods}; #[derive(Debug, PartialEq)] enum UnableToComposite { @@ -150,7 +150,7 @@ pub struct IOCompositor<Window: WindowMethods> { constellation_chan: Sender<ConstellationMsg>, /// The channel on which messages can be sent to the time profiler. - time_profiler_chan: time::ProfilerChan, + time_profiler_chan: profile_time::ProfilerChan, /// Touch input state machine touch_handler: TouchHandler, @@ -366,7 +366,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { // Tell the profiler, memory profiler, and scrolling timer to shut down. if let Ok((sender, receiver)) = ipc::channel() { self.time_profiler_chan - .send(time::ProfilerMsg::Exit(sender)); + .send(profile_time::ProfilerMsg::Exit(sender)); let _ = receiver.recv(); } diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index c0a0169cdcd..3203c7aa290 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -4,8 +4,8 @@ //! Communication with the compositor thread. -use SendableFrameTree; -use compositor::CompositingReason; +use crate::SendableFrameTree; +use crate::compositor::CompositingReason; use embedder_traits::EventLoopWaker; use gfx_traits::Epoch; use ipc_channel::ipc::IpcSender; diff --git a/components/compositing/lib.rs b/components/compositing/lib.rs index c5005a6a425..8b9e30c0d46 100644 --- a/components/compositing/lib.rs +++ b/components/compositing/lib.rs @@ -29,10 +29,10 @@ extern crate time; extern crate webrender; extern crate webrender_api; -pub use compositor_thread::CompositorProxy; -pub use compositor::IOCompositor; -pub use compositor::RenderNotifier; -pub use compositor::ShutdownState; +pub use crate::compositor_thread::CompositorProxy; +pub use crate::compositor::IOCompositor; +pub use crate::compositor::RenderNotifier; +pub use crate::compositor::ShutdownState; use euclid::TypedSize2D; use ipc_channel::ipc::IpcSender; use msg::constellation_msg::PipelineId; |