servo: Merge #11852 - Move ChromeToPaintMsg to gfx_traits (from Ms2ger:ChromeToPaintMsg); r=jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 9ee0a01f66b4b6fcbfd86e0316d6aed35ef99ebf
This commit is contained in:
Ms2ger 2016-06-25 00:26:37 -05:00
Родитель 33b46d13e4
Коммит 304be268ab
9 изменённых файлов: 29 добавлений и 27 удалений

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

@ -9,7 +9,6 @@ name = "compositing"
path = "lib.rs"
[dependencies]
gfx = {path = "../gfx"}
gfx_traits = {path = "../gfx_traits"}
script_traits = {path = "../script_traits"}
style_traits = {path = "../style_traits"}

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

@ -14,8 +14,7 @@ use euclid::rect::TypedRect;
use euclid::scale_factor::ScaleFactor;
use euclid::size::TypedSize2D;
use euclid::{Matrix4D, Point2D, Rect, Size2D};
use gfx::paint_thread::{ChromeToPaintMsg, PaintRequest};
use gfx_traits::{ScrollPolicy, StackingContextId};
use gfx_traits::{ChromeToPaintMsg, PaintRequest, ScrollPolicy, StackingContextId};
use gfx_traits::{color, Epoch, FrameTreeId, FragmentType, LayerId, LayerKind, LayerProperties};
use gleam::gl;
use gleam::gl::types::{GLint, GLsizei};

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

@ -15,7 +15,6 @@ extern crate app_units;
extern crate azure;
extern crate euclid;
extern crate gfx;
extern crate gfx_traits;
extern crate gleam;
extern crate image;
@ -39,7 +38,7 @@ extern crate webrender_traits;
pub use compositor_thread::CompositorProxy;
pub use compositor::IOCompositor;
use euclid::size::TypedSize2D;
use gfx::paint_thread::ChromeToPaintMsg;
use gfx_traits::ChromeToPaintMsg;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId;
use script_traits::{ConstellationControlMsg, LayoutControlMsg};

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

@ -11,7 +11,8 @@ use euclid::size::TypedSize2D;
#[cfg(not(target_os = "windows"))]
use gaol;
use gfx::font_cache_thread::FontCacheThread;
use gfx::paint_thread::{ChromeToPaintMsg, LayoutToPaintMsg, PaintThread};
use gfx::paint_thread::{LayoutToPaintMsg, PaintThread};
use gfx_traits::ChromeToPaintMsg;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
use layers::geometry::DevicePixel;

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

@ -15,14 +15,14 @@ use euclid::rect::Rect;
use euclid::size::Size2D;
use font_cache_thread::FontCacheThread;
use font_context::FontContext;
use gfx_traits::StackingContextId;
use gfx_traits::{Epoch, FrameTreeId, LayerId, LayerKind, LayerProperties, PaintListener};
use gfx_traits::{ChromeToPaintMsg, Epoch, LayerId, LayerKind, LayerProperties};
use gfx_traits::{PaintListener, PaintRequest, StackingContextId};
use ipc_channel::ipc::IpcSender;
use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet};
use layers::platform::surface::{NativeDisplay, NativeSurface};
use msg::constellation_msg::{PanicMsg, PipelineId};
use paint_context::PaintContext;
use profile_traits::mem::{self, ReportsChan};
use profile_traits::mem;
use profile_traits::time;
use rand::{self, Rng};
use std::borrow::ToOwned;
@ -325,14 +325,6 @@ impl LayerCreator {
}
}
pub struct PaintRequest {
pub buffer_requests: Vec<BufferRequest>,
pub scale: f32,
pub layer_id: LayerId,
pub epoch: Epoch,
pub layer_kind: LayerKind,
}
pub enum Msg {
FromLayout(LayoutToPaintMsg),
FromChrome(ChromeToPaintMsg),
@ -344,14 +336,6 @@ pub enum LayoutToPaintMsg {
Exit,
}
pub enum ChromeToPaintMsg {
Paint(Vec<PaintRequest>, FrameTreeId),
PaintPermissionGranted,
PaintPermissionRevoked,
CollectReports(ReportsChan),
Exit,
}
pub struct PaintThread<C> {
id: PipelineId,
_url: Url,

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

@ -13,6 +13,7 @@ azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
msg = {path = "../msg"}
plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"}
range = {path = "../range"}
rustc-serialize = "0.3"
euclid = {version = "0.6.5", features = ["plugins"]}

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

@ -15,6 +15,7 @@ extern crate euclid;
extern crate heapsize;
extern crate layers;
extern crate msg;
extern crate profile_traits;
#[macro_use]
extern crate range;
extern crate rustc_serialize;
@ -27,7 +28,9 @@ pub use paint_listener::PaintListener;
use azure::azure_hl::Color;
use euclid::Matrix4D;
use euclid::rect::Rect;
use layers::layers::BufferRequest;
use msg::constellation_msg::PipelineId;
use profile_traits::mem::ReportsChan;
use range::RangeIndex;
use std::fmt::{self, Debug, Formatter};
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
@ -266,3 +269,19 @@ int_range_index! {
#[derive(HeapSizeOf)]
struct ByteIndex(isize)
}
pub struct PaintRequest {
pub buffer_requests: Vec<BufferRequest>,
pub scale: f32,
pub layer_id: LayerId,
pub epoch: Epoch,
pub layer_kind: LayerKind,
}
pub enum ChromeToPaintMsg {
Paint(Vec<PaintRequest>, FrameTreeId),
PaintPermissionGranted,
PaintPermissionRevoked,
CollectReports(ReportsChan),
Exit,
}

2
servo/components/servo/Cargo.lock сгенерированный
Просмотреть файл

@ -313,7 +313,6 @@ dependencies = [
"app_units 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.4.5 (git+https://github.com/servo/rust-azure)",
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1",
"gfx_traits 0.0.1",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -818,6 +817,7 @@ dependencies = [
"layers 0.2.5 (git+https://github.com/servo/rust-layers)",
"msg 0.0.1",
"plugins 0.0.1",
"profile_traits 0.0.1",
"range 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",

2
servo/ports/cef/Cargo.lock сгенерированный
Просмотреть файл

@ -272,7 +272,6 @@ dependencies = [
"app_units 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.4.5 (git+https://github.com/servo/rust-azure)",
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1",
"gfx_traits 0.0.1",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -727,6 +726,7 @@ dependencies = [
"layers 0.2.5 (git+https://github.com/servo/rust-layers)",
"msg 0.0.1",
"plugins 0.0.1",
"profile_traits 0.0.1",
"range 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",