mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move FrameTreeId type to gfx_traits #9221
This commit is contained in:
parent
9c8382cbde
commit
e52c53a7f2
7 changed files with 15 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue