Update to euclid 0.8

This commit is contained in:
Martin Robinson 2016-08-11 00:29:19 +02:00 committed by Anthony Ramine
parent b7facf41cb
commit 6259df5e2d
56 changed files with 538 additions and 558 deletions

View file

@ -15,7 +15,7 @@ canvas = {path = "../canvas"}
canvas_traits = {path = "../canvas_traits"}
compositing = {path = "../compositing"}
devtools_traits = {path = "../devtools_traits"}
euclid = "0.7.1"
euclid = "0.8.2"
gfx = {path = "../gfx"}
gfx_traits = {path = "../gfx_traits"}
ipc-channel = "0.4.0"
@ -24,7 +24,7 @@ layout_traits = {path = "../layout_traits"}
log = "0.3.5"
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
offscreen_gl_context = "0.1.2"
offscreen_gl_context = "0.2.0"
plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"}
rand = "0.3"

View file

@ -535,7 +535,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
fn new_pipeline(&mut self,
pipeline_id: PipelineId,
parent_info: Option<(PipelineId, SubpageId, FrameType)>,
initial_window_size: Option<TypedSize2D<PagePx, f32>>,
initial_window_size: Option<TypedSize2D<f32, PagePx>>,
script_channel: Option<IpcSender<ConstellationControlMsg>>,
load_data: LoadData,
is_private: bool) {
@ -734,7 +734,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
// frame trees in the navigation context containing the subframe.
FromCompositorMsg::FrameSize(pipeline_id, size) => {
debug!("constellation got frame size message");
self.handle_frame_size_msg(pipeline_id, &Size2D::from_untyped(&size));
self.handle_frame_size_msg(pipeline_id, &TypedSize2D::from_untyped(&size));
}
FromCompositorMsg::GetFrame(pipeline_id, resp_chan) => {
debug!("constellation got get root pipeline message");
@ -1160,7 +1160,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
fn handle_frame_size_msg(&mut self,
pipeline_id: PipelineId,
size: &TypedSize2D<PagePx, f32>) {
size: &TypedSize2D<f32, PagePx>) {
let msg = ConstellationControlMsg::Resize(pipeline_id, WindowSizeData {
visible_viewport: *size,
initial_viewport: *size * ScaleFactor::new(1.0),
@ -2139,7 +2139,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
// If the rectangle for this pipeline is zero sized, it will
// never be painted. In this case, don't query the layout
// thread as it won't contribute to the final output image.
if size == Size2D::zero() {
if size == TypedSize2D::zero() {
continue;
}

View file

@ -62,7 +62,7 @@ pub struct Pipeline {
pub url: Url,
/// The title of the most recently-loaded page.
pub title: Option<String>,
pub size: Option<TypedSize2D<PagePx, f32>>,
pub size: Option<TypedSize2D<f32, PagePx>>,
/// Whether this pipeline is currently running animations. Pipelines that are running
/// animations cause composites to be continually scheduled.
pub running_animations: bool,
@ -112,9 +112,9 @@ pub struct InitialPipelineState {
/// A channel to the memory profiler thread.
pub mem_profiler_chan: profile_mem::ProfilerChan,
/// Information about the initial window size.
pub window_size: Option<TypedSize2D<PagePx, f32>>,
pub window_size: Option<TypedSize2D<f32, PagePx>>,
/// Information about the device pixel ratio.
pub device_pixel_ratio: ScaleFactor<ViewportPx, DevicePixel, f32>,
pub device_pixel_ratio: ScaleFactor<f32, ViewportPx, DevicePixel>,
/// A channel to the script thread, if applicable. If this is `Some`,
/// then `parent_info` must also be `Some`.
pub script_chan: Option<IpcSender<ConstellationControlMsg>>,
@ -280,7 +280,7 @@ impl Pipeline {
chrome_to_paint_chan: Sender<ChromeToPaintMsg>,
is_private: bool,
url: Url,
size: Option<TypedSize2D<PagePx, f32>>,
size: Option<TypedSize2D<f32, PagePx>>,
visible: bool)
-> Pipeline {
Pipeline {