mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #24426 - servo:wrup, r=jdm,nox
Update webrender <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24426) <!-- Reviewable:end -->
This commit is contained in:
commit
7da8d75a7e
19 changed files with 124 additions and 89 deletions
71
Cargo.lock
generated
71
Cargo.lock
generated
|
@ -1009,7 +1009,7 @@ name = "deny_public_fields"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"syn 1.0.3",
|
"syn 1.0.3",
|
||||||
"synstructure 0.12.1",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1038,7 +1038,7 @@ dependencies = [
|
||||||
"proc-macro2 1.0.1",
|
"proc-macro2 1.0.1",
|
||||||
"quote 1.0.2",
|
"quote 1.0.2",
|
||||||
"syn 1.0.3",
|
"syn 1.0.3",
|
||||||
"synstructure 0.12.1",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2232,9 +2232,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hyper_serde"
|
name = "hyper_serde"
|
||||||
version = "0.11.0"
|
version = "0.11.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f9ce9b7b7efb67dec22beaf71defbec5688240399889fc3050186db41b4a40cd"
|
checksum = "3bf0fc731a638339172253834b4ba8d60a9ecbeb4c031fcfcacd25b3cdf6e6c1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cookie",
|
"cookie",
|
||||||
"headers",
|
"headers",
|
||||||
|
@ -2434,7 +2434,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 1.0.1",
|
"proc-macro2 1.0.1",
|
||||||
"syn 1.0.3",
|
"syn 1.0.3",
|
||||||
"synstructure 0.12.1",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2906,7 +2906,7 @@ checksum = "e37c5d4cd9473c5f4c9c111f033f15d4df9bd378fdf615944e360a4f55a05f0b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 1.0.1",
|
"proc-macro2 1.0.1",
|
||||||
"syn 1.0.3",
|
"syn 1.0.3",
|
||||||
"synstructure 0.12.1",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -3558,7 +3558,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "peek-poke"
|
name = "peek-poke"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/servo/webrender#4646982f69d90f0b39b6345be4e4dbd96ce5ac05"
|
source = "git+https://github.com/servo/webrender#4f2d78adb6e07e3e5ab2da9765613ecf9e07eee0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"euclid",
|
"euclid",
|
||||||
"peek-poke-derive",
|
"peek-poke-derive",
|
||||||
|
@ -3566,14 +3566,14 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "peek-poke-derive"
|
name = "peek-poke-derive"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
source = "git+https://github.com/servo/webrender#4646982f69d90f0b39b6345be4e4dbd96ce5ac05"
|
source = "git+https://github.com/servo/webrender#4f2d78adb6e07e3e5ab2da9765613ecf9e07eee0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.26",
|
"proc-macro2 1.0.1",
|
||||||
"quote 0.6.12",
|
"quote 1.0.2",
|
||||||
"syn 0.15.39",
|
"syn 1.0.3",
|
||||||
"synstructure 0.10.1",
|
"synstructure",
|
||||||
"unicode-xid 0.1.0",
|
"unicode-xid 0.2.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -3670,9 +3670,9 @@ checksum = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "plane-split"
|
name = "plane-split"
|
||||||
version = "0.14.1"
|
version = "0.15.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "68a117c887fbcd9af8dfc1b8b12ee19ba9dec0b2a91d0a9d2bd9114e459f9c78"
|
checksum = "ffe16a646a08f4b4dd74035b9ff8e378eb1a4012a74f14f5889e7001cdbece33"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"binary-space-partition",
|
"binary-space-partition",
|
||||||
"euclid",
|
"euclid",
|
||||||
|
@ -3712,13 +3712,13 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro-hack"
|
name = "proc-macro-hack"
|
||||||
version = "0.5.7"
|
version = "0.5.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0c1dd4172a1e1f96f709341418f49b11ea6c2d95d53dca08c0f74cbd332d9cf3"
|
checksum = "e688f31d92ffd7c1ddc57a1b4e6d773c0f2a14ee437a4b0a4f5a69c80eb221c8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.26",
|
"proc-macro2 1.0.1",
|
||||||
"quote 0.6.12",
|
"quote 1.0.2",
|
||||||
"syn 0.15.39",
|
"syn 1.0.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -4169,6 +4169,7 @@ dependencies = [
|
||||||
"script_traits",
|
"script_traits",
|
||||||
"selectors",
|
"selectors",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_bytes",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"servo-media",
|
"servo-media",
|
||||||
"servo_allocator",
|
"servo_allocator",
|
||||||
|
@ -4334,9 +4335,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_bytes"
|
name = "serde_bytes"
|
||||||
version = "0.10.4"
|
version = "0.11.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "adb6e51a6b3696b301bc221d785f898b4457c619b51d7ce195a6d20baecb37b3"
|
checksum = "45af0182ff64abaeea290235eb67da3825a576c5d53e642c4d5b652e12e6effc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
@ -5028,7 +5029,7 @@ dependencies = [
|
||||||
"proc-macro2 1.0.1",
|
"proc-macro2 1.0.1",
|
||||||
"quote 1.0.2",
|
"quote 1.0.2",
|
||||||
"syn 1.0.3",
|
"syn 1.0.3",
|
||||||
"synstructure 0.12.1",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -5161,18 +5162,6 @@ dependencies = [
|
||||||
"unicode-xid 0.2.0",
|
"unicode-xid 0.2.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "synstructure"
|
|
||||||
version = "0.10.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2 0.4.26",
|
|
||||||
"quote 0.6.12",
|
|
||||||
"syn 0.15.39",
|
|
||||||
"unicode-xid 0.1.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "synstructure"
|
name = "synstructure"
|
||||||
version = "0.12.1"
|
version = "0.12.1"
|
||||||
|
@ -5334,7 +5323,7 @@ dependencies = [
|
||||||
"proc-macro2 1.0.1",
|
"proc-macro2 1.0.1",
|
||||||
"quote 1.0.2",
|
"quote 1.0.2",
|
||||||
"syn 1.0.3",
|
"syn 1.0.3",
|
||||||
"synstructure 0.12.1",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -5903,7 +5892,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender"
|
name = "webrender"
|
||||||
version = "0.60.0"
|
version = "0.60.0"
|
||||||
source = "git+https://github.com/servo/webrender#4646982f69d90f0b39b6345be4e4dbd96ce5ac05"
|
source = "git+https://github.com/servo/webrender#4f2d78adb6e07e3e5ab2da9765613ecf9e07eee0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"bincode",
|
"bincode",
|
||||||
|
@ -5944,7 +5933,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender_api"
|
name = "webrender_api"
|
||||||
version = "0.60.0"
|
version = "0.60.0"
|
||||||
source = "git+https://github.com/servo/webrender#4646982f69d90f0b39b6345be4e4dbd96ce5ac05"
|
source = "git+https://github.com/servo/webrender#4f2d78adb6e07e3e5ab2da9765613ecf9e07eee0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units",
|
"app_units",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
|
@ -5966,7 +5955,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender_build"
|
name = "webrender_build"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
source = "git+https://github.com/servo/webrender#4646982f69d90f0b39b6345be4e4dbd96ce5ac05"
|
source = "git+https://github.com/servo/webrender#4f2d78adb6e07e3e5ab2da9765613ecf9e07eee0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"sha2",
|
"sha2",
|
||||||
]
|
]
|
||||||
|
@ -6133,7 +6122,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wr_malloc_size_of"
|
name = "wr_malloc_size_of"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
source = "git+https://github.com/servo/webrender#4646982f69d90f0b39b6345be4e4dbd96ce5ac05"
|
source = "git+https://github.com/servo/webrender#4f2d78adb6e07e3e5ab2da9765613ecf9e07eee0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units",
|
"app_units",
|
||||||
"euclid",
|
"euclid",
|
||||||
|
|
|
@ -125,7 +125,7 @@ impl<'a> CanvasPaintThread<'a> {
|
||||||
) => {
|
) => {
|
||||||
let data = imagedata.map_or_else(
|
let data = imagedata.map_or_else(
|
||||||
|| vec![0; image_size.width as usize * image_size.height as usize * 4],
|
|| vec![0; image_size.width as usize * image_size.height as usize * 4],
|
||||||
|bytes| bytes.into(),
|
|bytes| bytes.into_vec(),
|
||||||
);
|
);
|
||||||
self.canvas(canvas_id).draw_image(
|
self.canvas(canvas_id).draw_image(
|
||||||
data,
|
data,
|
||||||
|
|
|
@ -22,7 +22,7 @@ malloc_size_of = { path = "../malloc_size_of" }
|
||||||
malloc_size_of_derive = "0.1"
|
malloc_size_of_derive = "0.1"
|
||||||
pixels = {path = "../pixels"}
|
pixels = {path = "../pixels"}
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
serde_bytes = "0.10"
|
serde_bytes = "0.11"
|
||||||
servo_config = {path = "../config"}
|
servo_config = {path = "../config"}
|
||||||
sparkle = "0.1"
|
sparkle = "0.1"
|
||||||
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
||||||
|
|
|
@ -172,7 +172,7 @@ impl SurfaceStyle {
|
||||||
repeat_y: bool,
|
repeat_y: bool,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
surface_data: surface_data.into(),
|
surface_data: ByteBuf::from(surface_data),
|
||||||
surface_size,
|
surface_size,
|
||||||
repeat_x,
|
repeat_x,
|
||||||
repeat_y,
|
repeat_y,
|
||||||
|
|
|
@ -67,7 +67,7 @@ use style::values::generics::image::{GradientKind, PaintWorklet};
|
||||||
use style::values::specified::ui::CursorKind;
|
use style::values::specified::ui::CursorKind;
|
||||||
use style::values::RGBA;
|
use style::values::RGBA;
|
||||||
use style_traits::ToCss;
|
use style_traits::ToCss;
|
||||||
use webrender_api::units::{LayoutRect, LayoutSize, LayoutTransform, LayoutVector2D};
|
use webrender_api::units::{LayoutRect, LayoutTransform, LayoutVector2D};
|
||||||
use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF};
|
use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF};
|
||||||
use webrender_api::{ColorU, ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LineStyle};
|
use webrender_api::{ColorU, ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LineStyle};
|
||||||
use webrender_api::{NinePatchBorder, NinePatchBorderSource, NormalBorder};
|
use webrender_api::{NinePatchBorder, NinePatchBorderSource, NormalBorder};
|
||||||
|
@ -357,9 +357,6 @@ impl<'a> DisplayListBuildState<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn add_image_item(&mut self, base: BaseDisplayItem, item: webrender_api::ImageDisplayItem) {
|
fn add_image_item(&mut self, base: BaseDisplayItem, item: webrender_api::ImageDisplayItem) {
|
||||||
if item.stretch_size == LayoutSize::zero() {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
self.add_display_item(DisplayItem::Image(CommonDisplayItem::new(base, item)))
|
self.add_display_item(DisplayItem::Image(CommonDisplayItem::new(base, item)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -833,6 +830,10 @@ impl Fragment {
|
||||||
index,
|
index,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if placement.tile_size.is_empty_or_negative() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
state.clipping_and_scrolling_scope(|state| {
|
state.clipping_and_scrolling_scope(|state| {
|
||||||
if !placement.clip_radii.is_zero() {
|
if !placement.clip_radii.is_zero() {
|
||||||
let clip_id =
|
let clip_id =
|
||||||
|
@ -849,9 +850,9 @@ impl Fragment {
|
||||||
);
|
);
|
||||||
|
|
||||||
debug!("(building display list) adding background image.");
|
debug!("(building display list) adding background image.");
|
||||||
state.add_image_item(
|
let item = CommonDisplayItem::new(
|
||||||
base,
|
base,
|
||||||
webrender_api::ImageDisplayItem {
|
webrender_api::RepeatingImageDisplayItem {
|
||||||
bounds: placement.bounds.to_f32_px(),
|
bounds: placement.bounds.to_f32_px(),
|
||||||
common: items::empty_common_item_properties(),
|
common: items::empty_common_item_properties(),
|
||||||
image_key: webrender_image.key.unwrap(),
|
image_key: webrender_image.key.unwrap(),
|
||||||
|
@ -862,6 +863,7 @@ impl Fragment {
|
||||||
color: webrender_api::ColorF::WHITE,
|
color: webrender_api::ColorF::WHITE,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
state.add_display_item(DisplayItem::RepeatingImage(item))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1835,8 +1837,6 @@ impl Fragment {
|
||||||
bounds: stacking_relative_content_box.to_layout(),
|
bounds: stacking_relative_content_box.to_layout(),
|
||||||
common: items::empty_common_item_properties(),
|
common: items::empty_common_item_properties(),
|
||||||
image_key: id,
|
image_key: id,
|
||||||
stretch_size: stacking_relative_content_box.size.to_layout(),
|
|
||||||
tile_spacing: LayoutSize::zero(),
|
|
||||||
image_rendering: self
|
image_rendering: self
|
||||||
.style
|
.style
|
||||||
.get_inherited_box()
|
.get_inherited_box()
|
||||||
|
@ -1858,8 +1858,6 @@ impl Fragment {
|
||||||
bounds: stacking_relative_content_box.to_layout(),
|
bounds: stacking_relative_content_box.to_layout(),
|
||||||
common: items::empty_common_item_properties(),
|
common: items::empty_common_item_properties(),
|
||||||
image_key: *image_key,
|
image_key: *image_key,
|
||||||
stretch_size: stacking_relative_border_box.size.to_layout(),
|
|
||||||
tile_spacing: LayoutSize::zero(),
|
|
||||||
image_rendering: ImageRendering::Auto,
|
image_rendering: ImageRendering::Auto,
|
||||||
alpha_type: webrender_api::AlphaType::PremultipliedAlpha,
|
alpha_type: webrender_api::AlphaType::PremultipliedAlpha,
|
||||||
color: webrender_api::ColorF::WHITE,
|
color: webrender_api::ColorF::WHITE,
|
||||||
|
@ -1891,8 +1889,6 @@ impl Fragment {
|
||||||
bounds: stacking_relative_border_box.to_layout(),
|
bounds: stacking_relative_border_box.to_layout(),
|
||||||
common: items::empty_common_item_properties(),
|
common: items::empty_common_item_properties(),
|
||||||
image_key,
|
image_key,
|
||||||
stretch_size: stacking_relative_content_box.size.to_layout(),
|
|
||||||
tile_spacing: LayoutSize::zero(),
|
|
||||||
image_rendering: ImageRendering::Auto,
|
image_rendering: ImageRendering::Auto,
|
||||||
alpha_type: webrender_api::AlphaType::PremultipliedAlpha,
|
alpha_type: webrender_api::AlphaType::PremultipliedAlpha,
|
||||||
color: webrender_api::ColorF::WHITE,
|
color: webrender_api::ColorF::WHITE,
|
||||||
|
|
|
@ -25,10 +25,11 @@ use std::fmt;
|
||||||
use style::computed_values::_servo_top_layer::T as InTopLayer;
|
use style::computed_values::_servo_top_layer::T as InTopLayer;
|
||||||
use webrender_api as wr;
|
use webrender_api as wr;
|
||||||
use webrender_api::units::{LayoutPixel, LayoutPoint, LayoutRect, LayoutSize, LayoutTransform};
|
use webrender_api::units::{LayoutPixel, LayoutPoint, LayoutRect, LayoutSize, LayoutTransform};
|
||||||
use webrender_api::{BorderRadius, ClipId, ClipMode, CommonItemProperties, ComplexClipRegion};
|
use webrender_api::{
|
||||||
use webrender_api::{ExternalScrollId, FilterOp, GlyphInstance, GradientStop, ImageKey};
|
BorderRadius, ClipId, ClipMode, CommonItemProperties, ComplexClipRegion, ExternalScrollId,
|
||||||
use webrender_api::{MixBlendMode, ScrollSensitivity, Shadow, SpatialId};
|
FilterOp, GlyphInstance, GradientStop, ImageKey, MixBlendMode, PrimitiveFlags,
|
||||||
use webrender_api::{StickyOffsetBounds, TransformStyle};
|
ScrollSensitivity, Shadow, SpatialId, StickyOffsetBounds, TransformStyle,
|
||||||
|
};
|
||||||
|
|
||||||
pub use style::dom::OpaqueNode;
|
pub use style::dom::OpaqueNode;
|
||||||
|
|
||||||
|
@ -377,6 +378,7 @@ pub enum DisplayItem {
|
||||||
Rectangle(Box<CommonDisplayItem<wr::RectangleDisplayItem>>),
|
Rectangle(Box<CommonDisplayItem<wr::RectangleDisplayItem>>),
|
||||||
Text(Box<CommonDisplayItem<wr::TextDisplayItem, Vec<GlyphInstance>>>),
|
Text(Box<CommonDisplayItem<wr::TextDisplayItem, Vec<GlyphInstance>>>),
|
||||||
Image(Box<CommonDisplayItem<wr::ImageDisplayItem>>),
|
Image(Box<CommonDisplayItem<wr::ImageDisplayItem>>),
|
||||||
|
RepeatingImage(Box<CommonDisplayItem<wr::RepeatingImageDisplayItem>>),
|
||||||
Border(Box<CommonDisplayItem<wr::BorderDisplayItem, Vec<GradientStop>>>),
|
Border(Box<CommonDisplayItem<wr::BorderDisplayItem, Vec<GradientStop>>>),
|
||||||
Gradient(Box<CommonDisplayItem<wr::GradientDisplayItem, Vec<GradientStop>>>),
|
Gradient(Box<CommonDisplayItem<wr::GradientDisplayItem, Vec<GradientStop>>>),
|
||||||
RadialGradient(Box<CommonDisplayItem<wr::RadialGradientDisplayItem, Vec<GradientStop>>>),
|
RadialGradient(Box<CommonDisplayItem<wr::RadialGradientDisplayItem, Vec<GradientStop>>>),
|
||||||
|
@ -451,7 +453,7 @@ pub fn empty_common_item_properties() -> CommonItemProperties {
|
||||||
clip_id: ClipId::root(wr::PipelineId::dummy()),
|
clip_id: ClipId::root(wr::PipelineId::dummy()),
|
||||||
spatial_id: SpatialId::root_scroll_node(wr::PipelineId::dummy()),
|
spatial_id: SpatialId::root_scroll_node(wr::PipelineId::dummy()),
|
||||||
hit_info: None,
|
hit_info: None,
|
||||||
is_backface_visible: false,
|
flags: PrimitiveFlags::empty(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,6 +674,7 @@ impl DisplayItem {
|
||||||
DisplayItem::Rectangle(ref rect) => &rect.base,
|
DisplayItem::Rectangle(ref rect) => &rect.base,
|
||||||
DisplayItem::Text(ref text) => &text.base,
|
DisplayItem::Text(ref text) => &text.base,
|
||||||
DisplayItem::Image(ref image_item) => &image_item.base,
|
DisplayItem::Image(ref image_item) => &image_item.base,
|
||||||
|
DisplayItem::RepeatingImage(ref image_item) => &image_item.base,
|
||||||
DisplayItem::Border(ref border) => &border.base,
|
DisplayItem::Border(ref border) => &border.base,
|
||||||
DisplayItem::Gradient(ref gradient) => &gradient.base,
|
DisplayItem::Gradient(ref gradient) => &gradient.base,
|
||||||
DisplayItem::RadialGradient(ref gradient) => &gradient.base,
|
DisplayItem::RadialGradient(ref gradient) => &gradient.base,
|
||||||
|
@ -703,6 +706,7 @@ impl DisplayItem {
|
||||||
DisplayItem::Rectangle(ref item) => item.item.common.clip_rect,
|
DisplayItem::Rectangle(ref item) => item.item.common.clip_rect,
|
||||||
DisplayItem::Text(ref item) => item.item.bounds,
|
DisplayItem::Text(ref item) => item.item.bounds,
|
||||||
DisplayItem::Image(ref item) => item.item.bounds,
|
DisplayItem::Image(ref item) => item.item.bounds,
|
||||||
|
DisplayItem::RepeatingImage(ref item) => item.item.bounds,
|
||||||
DisplayItem::Border(ref item) => item.item.bounds,
|
DisplayItem::Border(ref item) => item.item.bounds,
|
||||||
DisplayItem::Gradient(ref item) => item.item.bounds,
|
DisplayItem::Gradient(ref item) => item.item.bounds,
|
||||||
DisplayItem::RadialGradient(ref item) => item.item.bounds,
|
DisplayItem::RadialGradient(ref item) => item.item.bounds,
|
||||||
|
@ -736,20 +740,21 @@ impl fmt::Debug for DisplayItem {
|
||||||
f,
|
f,
|
||||||
"{} @ {:?} {:?}",
|
"{} @ {:?} {:?}",
|
||||||
match *self {
|
match *self {
|
||||||
DisplayItem::Rectangle(_) => "Rectangle".to_owned(),
|
DisplayItem::Rectangle(_) => "Rectangle",
|
||||||
DisplayItem::Text(_) => "Text".to_owned(),
|
DisplayItem::Text(_) => "Text",
|
||||||
DisplayItem::Image(_) => "Image".to_owned(),
|
DisplayItem::Image(_) => "Image",
|
||||||
DisplayItem::Border(_) => "Border".to_owned(),
|
DisplayItem::RepeatingImage(_) => "RepeatingImage",
|
||||||
DisplayItem::Gradient(_) => "Gradient".to_owned(),
|
DisplayItem::Border(_) => "Border",
|
||||||
DisplayItem::RadialGradient(_) => "RadialGradient".to_owned(),
|
DisplayItem::Gradient(_) => "Gradient",
|
||||||
DisplayItem::Line(_) => "Line".to_owned(),
|
DisplayItem::RadialGradient(_) => "RadialGradient",
|
||||||
DisplayItem::BoxShadow(_) => "BoxShadow".to_owned(),
|
DisplayItem::Line(_) => "Line",
|
||||||
DisplayItem::PushTextShadow(_) => "PushTextShadow".to_owned(),
|
DisplayItem::BoxShadow(_) => "BoxShadow",
|
||||||
DisplayItem::PopAllTextShadows(_) => "PopTextShadow".to_owned(),
|
DisplayItem::PushTextShadow(_) => "PushTextShadow",
|
||||||
DisplayItem::Iframe(_) => "Iframe".to_owned(),
|
DisplayItem::PopAllTextShadows(_) => "PopTextShadow",
|
||||||
|
DisplayItem::Iframe(_) => "Iframe",
|
||||||
DisplayItem::PushStackingContext(_) |
|
DisplayItem::PushStackingContext(_) |
|
||||||
DisplayItem::PopStackingContext(_) |
|
DisplayItem::PopStackingContext(_) |
|
||||||
DisplayItem::DefineClipScrollNode(_) => "".to_owned(),
|
DisplayItem::DefineClipScrollNode(_) => "",
|
||||||
},
|
},
|
||||||
self.bounds(),
|
self.bounds(),
|
||||||
self.base().clip_rect
|
self.base().clip_rect
|
||||||
|
|
|
@ -11,10 +11,10 @@ use crate::display_list::items::{BaseDisplayItem, ClipScrollNode, ClipScrollNode
|
||||||
use crate::display_list::items::{DisplayItem, DisplayList, StackingContextType};
|
use crate::display_list::items::{DisplayItem, DisplayList, StackingContextType};
|
||||||
use msg::constellation_msg::PipelineId;
|
use msg::constellation_msg::PipelineId;
|
||||||
use webrender_api::units::LayoutPoint;
|
use webrender_api::units::LayoutPoint;
|
||||||
use webrender_api::{self, ClipId, CommonItemProperties, DisplayItem as WrDisplayItem};
|
|
||||||
use webrender_api::{DisplayListBuilder, PropertyBinding, PushStackingContextDisplayItem};
|
|
||||||
use webrender_api::{
|
use webrender_api::{
|
||||||
RasterSpace, ReferenceFrameKind, SpaceAndClipInfo, SpatialId, StackingContext,
|
self, ClipId, CommonItemProperties, DisplayItem as WrDisplayItem, DisplayListBuilder,
|
||||||
|
PrimitiveFlags, PropertyBinding, PushStackingContextDisplayItem, RasterSpace,
|
||||||
|
ReferenceFrameKind, SpaceAndClipInfo, SpatialId, StackingContext,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ClipScrollState {
|
struct ClipScrollState {
|
||||||
|
@ -121,6 +121,11 @@ impl DisplayItem {
|
||||||
builder.push_item(&WrDisplayItem::Image(item.item));
|
builder.push_item(&WrDisplayItem::Image(item.item));
|
||||||
IsContentful(true)
|
IsContentful(true)
|
||||||
},
|
},
|
||||||
|
DisplayItem::RepeatingImage(ref mut item) => {
|
||||||
|
item.item.common = build_common_item_properties(&item.base, state);
|
||||||
|
builder.push_item(&WrDisplayItem::RepeatingImage(item.item));
|
||||||
|
IsContentful(true)
|
||||||
|
},
|
||||||
DisplayItem::Border(ref mut item) => {
|
DisplayItem::Border(ref mut item) => {
|
||||||
item.item.common = build_common_item_properties(&item.base, state);
|
item.item.common = build_common_item_properties(&item.base, state);
|
||||||
if !item.data.is_empty() {
|
if !item.data.is_empty() {
|
||||||
|
@ -232,7 +237,7 @@ impl DisplayItem {
|
||||||
let wr_item = PushStackingContextDisplayItem {
|
let wr_item = PushStackingContextDisplayItem {
|
||||||
origin: bounds.origin,
|
origin: bounds.origin,
|
||||||
spatial_id,
|
spatial_id,
|
||||||
is_backface_visible: true,
|
prim_flags: PrimitiveFlags::default(),
|
||||||
stacking_context: StackingContext {
|
stacking_context: StackingContext {
|
||||||
transform_style: stacking_context.transform_style,
|
transform_style: stacking_context.transform_style,
|
||||||
mix_blend_mode: stacking_context.mix_blend_mode,
|
mix_blend_mode: stacking_context.mix_blend_mode,
|
||||||
|
@ -331,7 +336,7 @@ fn build_common_item_properties(
|
||||||
spatial_id: state.active_spatial_id,
|
spatial_id: state.active_spatial_id,
|
||||||
clip_id: state.active_clip_id,
|
clip_id: state.active_clip_id,
|
||||||
// TODO(gw): Make use of the WR backface visibility functionality.
|
// TODO(gw): Make use of the WR backface visibility functionality.
|
||||||
is_backface_visible: true,
|
flags: PrimitiveFlags::default(),
|
||||||
hit_info: tag,
|
hit_info: tag,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ use crate::style_ext::ComputedValuesExt;
|
||||||
use app_units::Au;
|
use app_units::Au;
|
||||||
use euclid::{self, SideOffsets2D};
|
use euclid::{self, SideOffsets2D};
|
||||||
use style::values::computed::{BorderStyle, Length};
|
use style::values::computed::{BorderStyle, Length};
|
||||||
use webrender_api::{self as wr, units, CommonItemProperties};
|
use webrender_api::{self as wr, units, CommonItemProperties, PrimitiveFlags};
|
||||||
|
|
||||||
pub struct DisplayListBuilder {
|
pub struct DisplayListBuilder {
|
||||||
pipeline_id: wr::PipelineId,
|
pipeline_id: wr::PipelineId,
|
||||||
|
@ -76,7 +76,7 @@ impl BoxFragment {
|
||||||
spatial_id: wr::SpatialId::root_scroll_node(builder.pipeline_id),
|
spatial_id: wr::SpatialId::root_scroll_node(builder.pipeline_id),
|
||||||
hit_info: None,
|
hit_info: None,
|
||||||
// TODO(gw): Make use of the WR backface visibility functionality.
|
// TODO(gw): Make use of the WR backface visibility functionality.
|
||||||
is_backface_visible: true,
|
flags: PrimitiveFlags::default(),
|
||||||
};
|
};
|
||||||
|
|
||||||
self.background_display_items(builder, &common);
|
self.background_display_items(builder, &common);
|
||||||
|
|
|
@ -532,6 +532,20 @@ impl LayoutThread {
|
||||||
trace_layout: bool,
|
trace_layout: bool,
|
||||||
dump_flow_tree: bool,
|
dump_flow_tree: bool,
|
||||||
) -> LayoutThread {
|
) -> LayoutThread {
|
||||||
|
// Let webrender know about this pipeline by sending an empty display list.
|
||||||
|
let mut epoch = Epoch(0);
|
||||||
|
let webrender_api = webrender_api_sender.create_api();
|
||||||
|
let mut txn = webrender_api::Transaction::new();
|
||||||
|
txn.set_display_list(
|
||||||
|
webrender_api::Epoch(epoch.0),
|
||||||
|
None,
|
||||||
|
Default::default(),
|
||||||
|
(id.to_webrender(), Default::default(), Default::default()),
|
||||||
|
false,
|
||||||
|
);
|
||||||
|
webrender_api.send_transaction(webrender_document, txn);
|
||||||
|
epoch.next();
|
||||||
|
|
||||||
let device = Device::new(
|
let device = Device::new(
|
||||||
MediaType::screen(),
|
MediaType::screen(),
|
||||||
window_size.initial_viewport,
|
window_size.initial_viewport,
|
||||||
|
@ -576,9 +590,9 @@ impl LayoutThread {
|
||||||
document_shared_lock: None,
|
document_shared_lock: None,
|
||||||
running_animations: ServoArc::new(RwLock::new(Default::default())),
|
running_animations: ServoArc::new(RwLock::new(Default::default())),
|
||||||
expired_animations: ServoArc::new(RwLock::new(Default::default())),
|
expired_animations: ServoArc::new(RwLock::new(Default::default())),
|
||||||
epoch: Cell::new(Epoch(0)),
|
epoch: Cell::new(epoch),
|
||||||
viewport_size: Size2D::new(Au(0), Au(0)),
|
viewport_size: Size2D::new(Au(0), Au(0)),
|
||||||
webrender_api: webrender_api_sender.create_api(),
|
webrender_api,
|
||||||
webrender_document,
|
webrender_document,
|
||||||
stylist: Stylist::new(device, QuirksMode::NoQuirks),
|
stylist: Stylist::new(device, QuirksMode::NoQuirks),
|
||||||
rw_data: Arc::new(Mutex::new(LayoutThreadData {
|
rw_data: Arc::new(Mutex::new(LayoutThreadData {
|
||||||
|
|
|
@ -450,6 +450,20 @@ impl LayoutThread {
|
||||||
window_size: WindowSizeData,
|
window_size: WindowSizeData,
|
||||||
relayout_event: bool,
|
relayout_event: bool,
|
||||||
) -> LayoutThread {
|
) -> LayoutThread {
|
||||||
|
// Let webrender know about this pipeline by sending an empty display list.
|
||||||
|
let mut epoch = Epoch(0);
|
||||||
|
let webrender_api = webrender_api_sender.create_api();
|
||||||
|
let mut txn = webrender_api::Transaction::new();
|
||||||
|
txn.set_display_list(
|
||||||
|
webrender_api::Epoch(epoch.0),
|
||||||
|
None,
|
||||||
|
Default::default(),
|
||||||
|
(id.to_webrender(), Default::default(), Default::default()),
|
||||||
|
false,
|
||||||
|
);
|
||||||
|
webrender_api.send_transaction(webrender_document, txn);
|
||||||
|
epoch.next();
|
||||||
|
|
||||||
// The device pixel ratio is incorrect (it does not have the hidpi value),
|
// The device pixel ratio is incorrect (it does not have the hidpi value),
|
||||||
// but it will be set correctly when the initial reflow takes place.
|
// but it will be set correctly when the initial reflow takes place.
|
||||||
let device = Device::new(
|
let device = Device::new(
|
||||||
|
|
|
@ -36,7 +36,7 @@ hyper_serde = { version = "0.11", optional = true }
|
||||||
keyboard-types = {version = "0.4.3", optional = true}
|
keyboard-types = {version = "0.4.3", optional = true}
|
||||||
selectors = { path = "../selectors" }
|
selectors = { path = "../selectors" }
|
||||||
serde = { version = "1.0.27", optional = true }
|
serde = { version = "1.0.27", optional = true }
|
||||||
serde_bytes = { version = "0.10", optional = true }
|
serde_bytes = { version = "0.11", optional = true }
|
||||||
servo_arc = { path = "../servo_arc" }
|
servo_arc = { path = "../servo_arc" }
|
||||||
smallbitvec = "2.3.0"
|
smallbitvec = "2.3.0"
|
||||||
smallvec = "0.6"
|
smallvec = "0.6"
|
||||||
|
|
|
@ -91,6 +91,7 @@ script_plugins = {path = "../script_plugins"}
|
||||||
script_traits = {path = "../script_traits"}
|
script_traits = {path = "../script_traits"}
|
||||||
selectors = { path = "../selectors" }
|
selectors = { path = "../selectors" }
|
||||||
serde = {version = "1", features = ["derive"]}
|
serde = {version = "1", features = ["derive"]}
|
||||||
|
serde_bytes = "0.11"
|
||||||
servo_allocator = {path = "../allocator"}
|
servo_allocator = {path = "../allocator"}
|
||||||
servo_arc = {path = "../servo_arc"}
|
servo_arc = {path = "../servo_arc"}
|
||||||
servo_atoms = {path = "../atoms"}
|
servo_atoms = {path = "../atoms"}
|
||||||
|
|
|
@ -47,6 +47,7 @@ use net_traits::request::CorsSettings;
|
||||||
use pixels::PixelFormat;
|
use pixels::PixelFormat;
|
||||||
use profile_traits::ipc as profiled_ipc;
|
use profile_traits::ipc as profiled_ipc;
|
||||||
use script_traits::ScriptMsg;
|
use script_traits::ScriptMsg;
|
||||||
|
use serde_bytes::ByteBuf;
|
||||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
@ -505,7 +506,7 @@ impl CanvasState {
|
||||||
|
|
||||||
let smoothing_enabled = self.state.borrow().image_smoothing_enabled;
|
let smoothing_enabled = self.state.borrow().image_smoothing_enabled;
|
||||||
self.send_canvas_2d_msg(Canvas2dMsg::DrawImage(
|
self.send_canvas_2d_msg(Canvas2dMsg::DrawImage(
|
||||||
Some(image_data.into()),
|
Some(ByteBuf::from(image_data)),
|
||||||
image_size,
|
image_size,
|
||||||
dest_rect,
|
dest_rect,
|
||||||
source_rect,
|
source_rect,
|
||||||
|
|
|
@ -29,12 +29,15 @@ rand = [
|
||||||
packages = [
|
packages = [
|
||||||
"cgl",
|
"cgl",
|
||||||
"cocoa",
|
"cocoa",
|
||||||
"gl_generator", # https://github.com/servo/servo/pull/23288#issuecomment-494687746
|
|
||||||
"gleam",
|
"gleam",
|
||||||
|
|
||||||
|
# https://github.com/servo/servo/pull/23288#issuecomment-494687746
|
||||||
|
"gl_generator",
|
||||||
|
|
||||||
|
# https://github.com/servo/servo/issues/24421
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn",
|
||||||
"synstructure",
|
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
"wayland-sys",
|
"wayland-sys",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
[mix-blend-mode-both-parent-and-blended-with-3D-transform.html]
|
[mix-blend-mode-both-parent-and-blended-with-3D-transform.html]
|
||||||
type: reftest
|
expected: FAIL
|
||||||
expected:
|
|
||||||
if os == "linux": FAIL
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[mix-blend-mode-paragraph.html]
|
||||||
|
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
||||||
|
[mix-blend-mode-parent-with-3D-transform.html]
|
||||||
|
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
||||||
|
[mix-blend-mode-with-transform-and-preserve-3D.html]
|
||||||
|
expected:
|
||||||
|
if os == "linux": FAIL
|
|
@ -0,0 +1,2 @@
|
||||||
|
[pixel_snapping_position_a.html]
|
||||||
|
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue