mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #9289 - mskrzypkows:move_FrameTreeId, r=KiChjang
Move FrameTreeId type to gfx_traits #9221 Fixes #9221. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9289) <!-- Reviewable:end -->
This commit is contained in:
commit
3c6e16c9ad
7 changed files with 15 additions and 22 deletions
|
@ -14,7 +14,7 @@ use euclid::scale_factor::ScaleFactor;
|
||||||
use euclid::size::TypedSize2D;
|
use euclid::size::TypedSize2D;
|
||||||
use euclid::{Matrix4, Point2D, Rect, Size2D};
|
use euclid::{Matrix4, Point2D, Rect, Size2D};
|
||||||
use gfx::paint_thread::{ChromeToPaintMsg, PaintRequest};
|
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;
|
||||||
use gleam::gl::types::{GLint, GLsizei};
|
use gleam::gl::types::{GLint, GLsizei};
|
||||||
use image::{DynamicImage, ImageFormat, RgbImage};
|
use image::{DynamicImage, ImageFormat, RgbImage};
|
||||||
|
@ -27,7 +27,6 @@ use layers::rendergl;
|
||||||
use layers::rendergl::RenderContext;
|
use layers::rendergl::RenderContext;
|
||||||
use layers::scene::Scene;
|
use layers::scene::Scene;
|
||||||
use layout_traits::LayoutControlChan;
|
use layout_traits::LayoutControlChan;
|
||||||
use msg::compositor_msg::FrameTreeId;
|
|
||||||
use msg::constellation_msg::{AnimationState, Image, PixelFormat};
|
use msg::constellation_msg::{AnimationState, Image, PixelFormat};
|
||||||
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData, MouseButton};
|
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData, MouseButton};
|
||||||
use msg::constellation_msg::{NavigationDirection, PipelineId, WindowSizeData};
|
use msg::constellation_msg::{NavigationDirection, PipelineId, WindowSizeData};
|
||||||
|
|
|
@ -8,12 +8,11 @@ use CompositorMsg as ConstellationMsg;
|
||||||
use compositor;
|
use compositor;
|
||||||
use euclid::point::Point2D;
|
use euclid::point::Point2D;
|
||||||
use euclid::size::Size2D;
|
use euclid::size::Size2D;
|
||||||
use gfx_traits::{Epoch, LayerId, LayerProperties, PaintListener};
|
use gfx_traits::{Epoch, FrameTreeId, LayerId, LayerProperties, PaintListener};
|
||||||
use headless;
|
use headless;
|
||||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||||
use layers::layers::{BufferRequest, LayerBufferSet};
|
use layers::layers::{BufferRequest, LayerBufferSet};
|
||||||
use layers::platform::surface::{NativeDisplay, NativeSurface};
|
use layers::platform::surface::{NativeDisplay, NativeSurface};
|
||||||
use msg::compositor_msg::FrameTreeId;
|
|
||||||
use msg::constellation_msg::{AnimationState, PipelineId};
|
use msg::constellation_msg::{AnimationState, PipelineId};
|
||||||
use msg::constellation_msg::{Image, Key, KeyModifiers, KeyState};
|
use msg::constellation_msg::{Image, Key, KeyModifiers, KeyState};
|
||||||
use profile_traits::mem;
|
use profile_traits::mem;
|
||||||
|
|
|
@ -15,12 +15,11 @@ use euclid::rect::Rect;
|
||||||
use euclid::size::Size2D;
|
use euclid::size::Size2D;
|
||||||
use font_cache_thread::FontCacheThread;
|
use font_cache_thread::FontCacheThread;
|
||||||
use font_context::FontContext;
|
use font_context::FontContext;
|
||||||
use gfx_traits::color;
|
use gfx_traits::{Epoch, FrameTreeId, LayerId, LayerKind, LayerProperties};
|
||||||
use gfx_traits::{Epoch, LayerId, LayerKind, LayerProperties, PaintListener, PaintMsg as ConstellationMsg, ScrollPolicy};
|
use gfx_traits::{PaintListener, PaintMsg as ConstellationMsg, ScrollPolicy, color};
|
||||||
use ipc_channel::ipc::IpcSender;
|
use ipc_channel::ipc::IpcSender;
|
||||||
use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet};
|
use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet};
|
||||||
use layers::platform::surface::{NativeDisplay, NativeSurface};
|
use layers::platform::surface::{NativeDisplay, NativeSurface};
|
||||||
use msg::compositor_msg::FrameTreeId;
|
|
||||||
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
|
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
|
||||||
use paint_context::PaintContext;
|
use paint_context::PaintContext;
|
||||||
use profile_traits::mem::{self, ReportsChan};
|
use profile_traits::mem::{self, ReportsChan};
|
||||||
|
|
|
@ -136,3 +136,13 @@ impl Epoch {
|
||||||
*u += 1;
|
*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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use Epoch;
|
use Epoch;
|
||||||
|
use FrameTreeId;
|
||||||
use LayerId;
|
use LayerId;
|
||||||
use LayerProperties;
|
use LayerProperties;
|
||||||
use layers::layers::{BufferRequest, LayerBufferSet};
|
use layers::layers::{BufferRequest, LayerBufferSet};
|
||||||
use layers::platform::surface::NativeDisplay;
|
use layers::platform::surface::NativeDisplay;
|
||||||
use msg::compositor_msg::FrameTreeId;
|
|
||||||
use msg::constellation_msg::PipelineId;
|
use msg::constellation_msg::PipelineId;
|
||||||
|
|
||||||
/// The interface used by the painter to acquire draw targets for each paint frame and
|
/// 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 url;
|
||||||
extern crate util;
|
extern crate util;
|
||||||
|
|
||||||
pub mod compositor_msg;
|
|
||||||
pub mod constellation_msg;
|
pub mod constellation_msg;
|
||||||
pub mod webdriver_msg;
|
pub mod webdriver_msg;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue