servo: Merge #9289 - Move FrameTreeId type to gfx_traits #9221 (from mskrzypkows:move_FrameTreeId); r=KiChjang

Fixes #9221.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3c6e16c9add63b421deae422cf98a65fabadb410
This commit is contained in:
Maciej Skrzypkowski 2016-01-14 01:37:47 +05:01
Родитель b3f216d5b0
Коммит a29e3050be
7 изменённых файлов: 15 добавлений и 22 удалений

Просмотреть файл

@ -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};

Просмотреть файл

@ -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;

Просмотреть файл

@ -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};

Просмотреть файл

@ -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;
}
}

Просмотреть файл

@ -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

Просмотреть файл

@ -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;
}
}

Просмотреть файл

@ -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;