mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Update rust-layers to get 2d transform + clipping support.
This commit is contained in:
parent
2b9590c5a5
commit
30d9e75557
6 changed files with 10 additions and 10 deletions
|
@ -1238,10 +1238,10 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
||||||
request.page_rect = request.page_rect / scale.get();
|
request.page_rect = request.page_rect / scale.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
let layer_kind = if layer.transform_state.borrow().is_3d {
|
let layer_kind = if layer.transform_state.borrow().has_transform {
|
||||||
LayerKind::Layer3D
|
LayerKind::HasTransform
|
||||||
} else {
|
} else {
|
||||||
LayerKind::Layer2D
|
LayerKind::NoTransform
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut paint_request = PaintRequest {
|
let mut paint_request = PaintRequest {
|
||||||
|
|
|
@ -423,7 +423,7 @@ impl StackingContext {
|
||||||
// TODO(gw): This is a hack to avoid running the DL optimizer
|
// TODO(gw): This is a hack to avoid running the DL optimizer
|
||||||
// on 3d transformed tiles. We should have a better solution
|
// on 3d transformed tiles. We should have a better solution
|
||||||
// than just disabling the opts here.
|
// than just disabling the opts here.
|
||||||
if paint_context.layer_kind == LayerKind::Layer3D {
|
if paint_context.layer_kind == LayerKind::HasTransform {
|
||||||
self.draw_into_context(&self.display_list,
|
self.draw_into_context(&self.display_list,
|
||||||
paint_context,
|
paint_context,
|
||||||
&transform,
|
&transform,
|
||||||
|
@ -1022,7 +1022,7 @@ impl<'a> Iterator for DisplayItemIterator<'a> {
|
||||||
impl DisplayItem {
|
impl DisplayItem {
|
||||||
/// Paints this display item into the given painting context.
|
/// Paints this display item into the given painting context.
|
||||||
fn draw_into_context(&self, paint_context: &mut PaintContext) {
|
fn draw_into_context(&self, paint_context: &mut PaintContext) {
|
||||||
if paint_context.layer_kind == LayerKind::Layer2D {
|
if paint_context.layer_kind == LayerKind::NoTransform {
|
||||||
let this_clip = &self.base().clip;
|
let this_clip = &self.base().clip;
|
||||||
match paint_context.transient_clip {
|
match paint_context.transient_clip {
|
||||||
Some(ref transient_clip) if transient_clip == this_clip => {}
|
Some(ref transient_clip) if transient_clip == this_clip => {}
|
||||||
|
|
|
@ -55,8 +55,8 @@ impl LayerId {
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||||
pub enum LayerKind {
|
pub enum LayerKind {
|
||||||
Layer2D,
|
NoTransform,
|
||||||
Layer3D,
|
HasTransform,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The scrolling policy of a layer.
|
/// The scrolling policy of a layer.
|
||||||
|
|
2
components/servo/Cargo.lock
generated
2
components/servo/Cargo.lock
generated
|
@ -747,7 +747,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "layers"
|
name = "layers"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/servo/rust-layers#e2283b8ec3d3eb2e10afa8a318deda71dd59d11a"
|
source = "git+https://github.com/servo/rust-layers#c4fa565228a9741a1c138a96421fcbd156ad1e45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
|
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
|
||||||
"cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
2
ports/cef/Cargo.lock
generated
2
ports/cef/Cargo.lock
generated
|
@ -739,7 +739,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "layers"
|
name = "layers"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/servo/rust-layers#e2283b8ec3d3eb2e10afa8a318deda71dd59d11a"
|
source = "git+https://github.com/servo/rust-layers#c4fa565228a9741a1c138a96421fcbd156ad1e45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
|
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
|
||||||
"cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
2
ports/gonk/Cargo.lock
generated
2
ports/gonk/Cargo.lock
generated
|
@ -671,7 +671,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "layers"
|
name = "layers"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/servo/rust-layers#e2283b8ec3d3eb2e10afa8a318deda71dd59d11a"
|
source = "git+https://github.com/servo/rust-layers#c4fa565228a9741a1c138a96421fcbd156ad1e45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
|
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
|
||||||
"cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue