diff --git a/servo/components/compositing/compositor.rs b/servo/components/compositing/compositor.rs index da23b60b4147..03be8bcef241 100644 --- a/servo/components/compositing/compositor.rs +++ b/servo/components/compositing/compositor.rs @@ -14,7 +14,7 @@ use euclid::scale_factor::ScaleFactor; use euclid::size::TypedSize2D; use euclid::{Matrix4, Point2D, Rect, Size2D}; use gfx::paint_thread::{ChromeToPaintMsg, PaintRequest}; -use gfx_traits::{color, Epoch, LayerId, LayerKind, LayerProperties, ScrollPolicy}; +use gfx_traits::{color, Epoch, FrameTreeId, LayerId, LayerKind, LayerProperties, ScrollPolicy}; use gleam::gl; use gleam::gl::types::{GLint, GLsizei}; use image::{DynamicImage, ImageFormat, RgbImage}; @@ -27,7 +27,6 @@ use layers::rendergl; use layers::rendergl::RenderContext; use layers::scene::Scene; use layout_traits::LayoutControlChan; -use msg::compositor_msg::FrameTreeId; use msg::constellation_msg::{AnimationState, Image, PixelFormat}; use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData, MouseButton}; use msg::constellation_msg::{NavigationDirection, PipelineId, WindowSizeData}; diff --git a/servo/components/compositing/compositor_thread.rs b/servo/components/compositing/compositor_thread.rs index 4972c6bc6ccf..98a65863f77c 100644 --- a/servo/components/compositing/compositor_thread.rs +++ b/servo/components/compositing/compositor_thread.rs @@ -8,12 +8,11 @@ use CompositorMsg as ConstellationMsg; use compositor; use euclid::point::Point2D; use euclid::size::Size2D; -use gfx_traits::{Epoch, LayerId, LayerProperties, PaintListener}; +use gfx_traits::{Epoch, FrameTreeId, LayerId, LayerProperties, PaintListener}; use headless; use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use layers::layers::{BufferRequest, LayerBufferSet}; use layers::platform::surface::{NativeDisplay, NativeSurface}; -use msg::compositor_msg::FrameTreeId; use msg::constellation_msg::{AnimationState, PipelineId}; use msg::constellation_msg::{Image, Key, KeyModifiers, KeyState}; use profile_traits::mem; diff --git a/servo/components/gfx/paint_thread.rs b/servo/components/gfx/paint_thread.rs index 799960cfd7af..12187a527cc1 100644 --- a/servo/components/gfx/paint_thread.rs +++ b/servo/components/gfx/paint_thread.rs @@ -15,12 +15,11 @@ use euclid::rect::Rect; use euclid::size::Size2D; use font_cache_thread::FontCacheThread; use font_context::FontContext; -use gfx_traits::color; -use gfx_traits::{Epoch, LayerId, LayerKind, LayerProperties, PaintListener, PaintMsg as ConstellationMsg, ScrollPolicy}; +use gfx_traits::{Epoch, FrameTreeId, LayerId, LayerKind, LayerProperties}; +use gfx_traits::{PaintListener, PaintMsg as ConstellationMsg, ScrollPolicy, color}; use ipc_channel::ipc::IpcSender; use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet}; use layers::platform::surface::{NativeDisplay, NativeSurface}; -use msg::compositor_msg::FrameTreeId; use msg::constellation_msg::{ConstellationChan, Failure, PipelineId}; use paint_context::PaintContext; use profile_traits::mem::{self, ReportsChan}; diff --git a/servo/components/gfx_traits/lib.rs b/servo/components/gfx_traits/lib.rs index 30275465d856..980e850b0145 100644 --- a/servo/components/gfx_traits/lib.rs +++ b/servo/components/gfx_traits/lib.rs @@ -136,3 +136,13 @@ impl Epoch { *u += 1; } } + +#[derive(PartialEq, Eq, Debug, Copy, Clone)] +pub struct FrameTreeId(pub u32); + +impl FrameTreeId { + pub fn next(&mut self) { + let FrameTreeId(ref mut u) = *self; + *u += 1; + } +} diff --git a/servo/components/gfx_traits/paint_listener.rs b/servo/components/gfx_traits/paint_listener.rs index d132e1af0cb5..f47b442dead0 100644 --- a/servo/components/gfx_traits/paint_listener.rs +++ b/servo/components/gfx_traits/paint_listener.rs @@ -3,11 +3,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use Epoch; +use FrameTreeId; use LayerId; use LayerProperties; use layers::layers::{BufferRequest, LayerBufferSet}; use layers::platform::surface::NativeDisplay; -use msg::compositor_msg::FrameTreeId; use msg::constellation_msg::PipelineId; /// The interface used by the painter to acquire draw targets for each paint frame and diff --git a/servo/components/msg/compositor_msg.rs b/servo/components/msg/compositor_msg.rs deleted file mode 100644 index bea159abc1f0..000000000000 --- a/servo/components/msg/compositor_msg.rs +++ /dev/null @@ -1,13 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -#[derive(PartialEq, Eq, Debug, Copy, Clone)] -pub struct FrameTreeId(pub u32); - -impl FrameTreeId { - pub fn next(&mut self) { - let FrameTreeId(ref mut u) = *self; - *u += 1; - } -} diff --git a/servo/components/msg/lib.rs b/servo/components/msg/lib.rs index 13a50e6a9627..3b5c99b8f3ca 100644 --- a/servo/components/msg/lib.rs +++ b/servo/components/msg/lib.rs @@ -16,6 +16,5 @@ extern crate serde; extern crate url; extern crate util; -pub mod compositor_msg; pub mod constellation_msg; pub mod webdriver_msg;