Skip to content

Commit

Permalink
Move PaintMsg enum to gfx_traits #8844
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Skrzypkowski committed Dec 18, 2015
1 parent f3e921a commit 3f7f323
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion components/compositing/constellation.rs
Expand Up @@ -22,12 +22,12 @@ use euclid::size::{Size2D, TypedSize2D};
use gaol;
use gaol::sandbox::{self, Sandbox, SandboxMethods};
use gfx::font_cache_task::FontCacheTask;
use gfx_traits::PaintMsg as FromPaintMsg;
use ipc_channel::ipc::{self, IpcOneShotServer, IpcSender};
use ipc_channel::router::ROUTER;
use layout_traits::{LayoutControlChan, LayoutTaskFactory};
use msg::compositor_msg::Epoch;
use msg::constellation_msg::AnimationState;
use msg::constellation_msg::PaintMsg as FromPaintMsg;
use msg::constellation_msg::WebDriverCommandMsg;
use msg::constellation_msg::{DocumentState, FrameId, PipelineId};
use msg::constellation_msg::{IframeLoadInfo, IFrameSandboxState, MozBrowserEvent, NavigationDirection};
Expand Down
2 changes: 1 addition & 1 deletion components/compositing/pipeline.rs
Expand Up @@ -10,12 +10,12 @@ use euclid::scale_factor::ScaleFactor;
use euclid::size::TypedSize2D;
use gfx::font_cache_task::FontCacheTask;
use gfx::paint_task::{ChromeToPaintMsg, LayoutToPaintMsg, PaintTask};
use gfx_traits::PaintMsg;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
use layers::geometry::DevicePixel;
use layout_traits::{LayoutControlChan, LayoutTaskFactory};
use msg::compositor_msg::ScriptToCompositorMsg;
use msg::constellation_msg::PaintMsg;
use msg::constellation_msg::{ConstellationChan, Failure, FrameId, PipelineId, SubpageId};
use msg::constellation_msg::{LoadData, MozBrowserEvent, WindowSizeData};
use msg::constellation_msg::{PipelineNamespaceId};
Expand Down
3 changes: 1 addition & 2 deletions components/gfx/paint_task.rs
Expand Up @@ -15,12 +15,11 @@ use euclid::rect::Rect;
use euclid::size::Size2D;
use font_cache_task::FontCacheTask;
use font_context::FontContext;
use gfx_traits::{PaintListener, color};
use gfx_traits::{color, PaintListener, PaintMsg as ConstellationMsg};
use ipc_channel::ipc::IpcSender;
use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet};
use layers::platform::surface::{NativeDisplay, NativeSurface};
use msg::compositor_msg::{Epoch, FrameTreeId, LayerId, LayerKind, LayerProperties, ScrollPolicy};
use msg::constellation_msg::PaintMsg as ConstellationMsg;
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
use paint_context::PaintContext;
use profile_traits::mem::{self, ReportsChan};
Expand Down
4 changes: 4 additions & 0 deletions components/gfx_traits/Cargo.toml
Expand Up @@ -17,3 +17,7 @@ features = ["plugins"]

[dependencies.msg]
path = "../msg"

[dependencies]
serde = "0.6"
serde_macros = "0.6"
10 changes: 10 additions & 0 deletions components/gfx_traits/lib.rs
Expand Up @@ -2,14 +2,24 @@
* 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/. */

#![feature(custom_derive, plugin)]
#![plugin(serde_macros)]
#![crate_name = "gfx_traits"]
#![crate_type = "rlib"]

extern crate azure;
extern crate layers;
extern crate msg;
extern crate serde;

pub mod color;
mod paint_listener;

pub use paint_listener::PaintListener;
use msg::constellation_msg::Failure;

/// Messages from the paint task to the constellation.
#[derive(Deserialize, Serialize)]
pub enum PaintMsg {
Failure(Failure),
}
6 changes: 0 additions & 6 deletions components/msg/constellation_msg.rs
Expand Up @@ -241,12 +241,6 @@ pub enum MouseButton {
Right,
}

/// Messages from the paint task to the constellation.
#[derive(Deserialize, Serialize)]
pub enum PaintMsg {
Failure(Failure),
}

#[derive(Clone, Eq, PartialEq, Deserialize, Serialize, Debug)]
pub enum AnimationState {
AnimationsPresent,
Expand Down
2 changes: 2 additions & 0 deletions components/servo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ports/cef/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ports/gonk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3f7f323

Please sign in to comment.