Move FrameTreeId to compositing.

This commit is contained in:
Ms2ger 2017-01-04 12:17:50 +01:00
parent 0b5dc7ed34
commit 7ef81c3d7d
2 changed files with 10 additions and 10 deletions

View file

@ -12,7 +12,7 @@ use euclid::point::TypedPoint2D;
use euclid::scale_factor::ScaleFactor; use euclid::scale_factor::ScaleFactor;
use euclid::size::TypedSize2D; use euclid::size::TypedSize2D;
use gfx_traits::{DevicePixel, LayerPixel, ScrollRootId}; use gfx_traits::{DevicePixel, LayerPixel, ScrollRootId};
use gfx_traits::{Epoch, FrameTreeId, FragmentType}; use gfx_traits::{Epoch, FragmentType};
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};
@ -108,6 +108,15 @@ enum ReadyState {
ReadyToSaveImage, ReadyToSaveImage,
} }
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
struct FrameTreeId(u32);
impl FrameTreeId {
pub fn next(&mut self) {
self.0 += 1;
}
}
/// NB: Never block on the constellation, because sometimes the constellation blocks on us. /// NB: Never block on the constellation, because sometimes the constellation blocks on us.
pub struct IOCompositor<Window: WindowMethods> { pub struct IOCompositor<Window: WindowMethods> {
/// The application window. /// The application window.

View file

@ -88,15 +88,6 @@ impl Epoch {
} }
} }
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
pub struct FrameTreeId(pub u32);
impl FrameTreeId {
pub fn next(&mut self) {
self.0 += 1;
}
}
/// A unique ID for every stacking context. /// A unique ID for every stacking context.
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, HeapSizeOf, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, HeapSizeOf, PartialEq, Serialize)]
pub struct StackingContextId( pub struct StackingContextId(