mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Use the new nonzero crate in the msg crate
This commit is contained in:
parent
c4bf3ec14f
commit
57709dc0bf
8 changed files with 43 additions and 17 deletions
|
@ -9,6 +9,9 @@ publish = false
|
|||
name = "compositing"
|
||||
path = "lib.rs"
|
||||
|
||||
[features]
|
||||
unstable = ["nonzero/unstable"]
|
||||
|
||||
[dependencies]
|
||||
euclid = "0.15"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
|
@ -18,6 +21,7 @@ ipc-channel = "0.8"
|
|||
log = "0.3.5"
|
||||
msg = {path = "../msg"}
|
||||
net_traits = {path = "../net_traits"}
|
||||
nonzero = {path = "../nonzero"}
|
||||
profile_traits = {path = "../profile_traits"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
servo_config = {path = "../config"}
|
||||
|
|
|
@ -6,7 +6,6 @@ use CompositionPipeline;
|
|||
use SendableFrameTree;
|
||||
use compositor_thread::{CompositorProxy, CompositorReceiver};
|
||||
use compositor_thread::{InitialCompositorState, Msg, RenderListener};
|
||||
use core::nonzero::NonZero;
|
||||
use euclid::{Point2D, TypedPoint2D, TypedVector2D, ScaleFactor};
|
||||
use gfx_traits::Epoch;
|
||||
use gleam::gl;
|
||||
|
@ -14,6 +13,7 @@ use image::{DynamicImage, ImageFormat, RgbImage};
|
|||
use ipc_channel::ipc::{self, IpcSharedMemory};
|
||||
use msg::constellation_msg::{PipelineId, PipelineIndex, PipelineNamespaceId};
|
||||
use net_traits::image::base::{Image, PixelFormat};
|
||||
use nonzero::NonZeroU32;
|
||||
use profile_traits::time::{self, ProfilerCategory, profile};
|
||||
use script_traits::{AnimationState, AnimationTickType, ConstellationControlMsg};
|
||||
use script_traits::{ConstellationMsg, LayoutControlMsg, MouseButton};
|
||||
|
@ -62,7 +62,7 @@ impl ConvertPipelineIdFromWebRender for webrender_api::PipelineId {
|
|||
fn from_webrender(&self) -> PipelineId {
|
||||
PipelineId {
|
||||
namespace_id: PipelineNamespaceId(self.0),
|
||||
index: PipelineIndex(NonZero::new(self.1).expect("Webrender pipeline zero?")),
|
||||
index: PipelineIndex(NonZeroU32::new(self.1).expect("Webrender pipeline zero?")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![deny(unsafe_code)]
|
||||
#![feature(nonzero)]
|
||||
#![cfg_attr(feature = "unstable", feature(nonzero))]
|
||||
|
||||
extern crate core;
|
||||
extern crate euclid;
|
||||
extern crate gfx_traits;
|
||||
extern crate gleam;
|
||||
|
@ -15,6 +14,7 @@ extern crate ipc_channel;
|
|||
extern crate log;
|
||||
extern crate msg;
|
||||
extern crate net_traits;
|
||||
extern crate nonzero;
|
||||
extern crate profile_traits;
|
||||
extern crate script_traits;
|
||||
extern crate servo_config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue