From 79d2e10e435efba527aab3840db3630bed3c901e Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 31 Mar 2020 23:04:54 +0000 Subject: [PATCH 01/10] Bug 1617050 - Take shadow offsets into account when clipping a primitive. r=gw Differential Revision: https://phabricator.services.mozilla.com/D68230 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/da4563936652c0f91133871df477f99292fac33a --- webrender/src/picture.rs | 38 ++++++++++++++++-- webrender/src/prim_store/mod.rs | 14 +++++++ .../filters/filter-drop-shadow-clip-3.png | Bin 0 -> 38867 bytes .../filters/filter-drop-shadow-clip-3.yaml | 37 +++++++++++++++++ wrench/reftests/filters/reftest.list | 3 +- 5 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 wrench/reftests/filters/filter-drop-shadow-clip-3.png create mode 100644 wrench/reftests/filters/filter-drop-shadow-clip-3.yaml diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index 51c55c10a4..7436d861a7 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -106,7 +106,7 @@ use crate::spatial_tree::{ROOT_SPATIAL_NODE_INDEX, use crate::composite::{CompositorKind, CompositeState, NativeSurfaceId, NativeTileId}; use crate::composite::{ExternalSurfaceDescriptor}; use crate::debug_colors; -use euclid::{vec3, Point2D, Scale, Size2D, Vector2D, Rect, Transform3D}; +use euclid::{vec2, vec3, Point2D, Scale, Size2D, Vector2D, Rect, Transform3D, SideOffsets2D}; use euclid::approxeq::ApproxEq; use crate::filterdata::SFilterData; use crate::frame_builder::{FrameBuilderConfig, FrameVisibilityContext, FrameVisibilityState}; @@ -4572,11 +4572,43 @@ impl PicturePrimitive { .surfaces[raster_config.surface_index.0] .scale_factors; + // If the primitive has a filter that can sample with an offset, the clip rect has + // to take it into account. + let clip_inflation = match raster_config.composite_mode { + PictureCompositeMode::Filter(Filter::DropShadows(ref shadows)) => { + let mut max_offset = vec2(0.0, 0.0); + let mut min_offset = vec2(0.0, 0.0); + for shadow in shadows { + let offset = shadow.offset.cast_unit(); + max_offset = max_offset.max(offset); + min_offset = min_offset.min(offset); + } + + // Get the shadow offsets in world space. + let raster_min = map_pic_to_raster.map_vector(min_offset); + let raster_max = map_pic_to_raster.map_vector(max_offset); + let world_min = map_raster_to_world.map_vector(raster_min); + let world_max = map_raster_to_world.map_vector(raster_max); + + let top_left = -world_max.max(vec2(0.0, 0.0)); + let bottom_right = -world_min.min(vec2(0.0, 0.0)); + + // Grow the clip in the opposite direction of the shadow's offset. + SideOffsets2D::new( + -top_left.y, + bottom_right.x, + bottom_right.y, + -top_left.x, + ) + } + _ => SideOffsets2D::zero(), + }; + let (mut clipped, mut unclipped) = match get_raster_rects( pic_rect, &map_pic_to_raster, &map_raster_to_world, - clipped_prim_bounding_rect, + clipped_prim_bounding_rect.outer_rect(clip_inflation), device_pixel_scale, ) { Some(info) => info, @@ -4736,8 +4768,6 @@ impl PicturePrimitive { PictureCompositeMode::Filter(Filter::DropShadows(ref shadows)) => { let mut max_std_deviation = 0.0; for shadow in shadows { - // TODO(nical) presumably we should compute the clipped rect for each shadow - // and compute the union of them to determine what we need to rasterize and blur? max_std_deviation = f32::max(max_std_deviation, shadow.blur_radius); } max_std_deviation = clamp_blur_radius(max_std_deviation, scale_factors) * device_pixel_scale.0; diff --git a/webrender/src/prim_store/mod.rs b/webrender/src/prim_store/mod.rs index 18e15f95ee..ec67bab08f 100644 --- a/webrender/src/prim_store/mod.rs +++ b/webrender/src/prim_store/mod.rs @@ -344,6 +344,20 @@ impl SpaceMapper where F: fmt::Debug { } } } + + pub fn map_vector(&self, v: Vector2D) -> Vector2D { + match self.kind { + CoordinateSpaceMapping::Local => { + v.cast_unit() + } + CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => { + scale_offset.map_vector(&v) + } + CoordinateSpaceMapping::Transform(ref transform) => { + transform.transform_vector2d(v) + } + } + } } /// For external images, it's not possible to know the diff --git a/wrench/reftests/filters/filter-drop-shadow-clip-3.png b/wrench/reftests/filters/filter-drop-shadow-cl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_ T8x12-@N@XUvHkgfI9&ZdV>IdB literal 0 HcmV?d00001 diff --git a/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml b/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml new file mode 100644 index 0000000000..8f6552977f --- /dev/null +++ b/wrench/reftests/filters/filter-drop-shadow-clip-3.yaml @@ -0,0 +1,37 @@ +--- +# WebRender internally clips the stacking context to avoid +# rendering parts that are off-screen. It has to take shadow +# offsets into account. +# This test introduces a 90 degrees rotation to ensure that +# the clip inflation isn't done in the wrong space. +root: + items: + # Rotation inside of the shadowed stacking context. + - type: stacking-context + bounds: [0, -10, 200, 100] + filters: drop-shadow([-10, 200], 5, red) + items: + - type: stacking-context + bounds: [50, -10, 200, 100] + transform: rotate-z(90) + items: + - + bounds: [0, 0, 500, 150] + glyphs: [55, 75, 76, 86] + offsets: [0, 100, 75, 100, 150, 100, 180, 100] + size: 90 + color: blue + font: "../text/VeraBd.ttf" + # Rotation applied to the shadowed stacking context directly. + - type: stacking-context + bounds: [150, 35, 200, 100] + filters: drop-shadow([200, 10], 5, red) + transform: rotate-z(90) + items: + - + bounds: [0, 0, 500, 150] + glyphs: [55, 75, 76, 86] + offsets: [0, 100, 75, 100, 150, 100, 180, 100] + size: 90 + color: blue + font: "../text/VeraBd.ttf" diff --git a/wrench/reftests/filters/reftest.list b/wrench/reftests/filters/reftest.list index 0853d8fbc7..97fdcbc675 100644 --- a/wrench/reftests/filters/reftest.list +++ b/wrench/reftests/filters/reftest.list @@ -35,7 +35,8 @@ platform(linux,mac) == filter-drop-shadow.yaml filter-drop-shadow.png platform(linux,mac) == filter-drop-shadow-on-viewport-edge.yaml filter-drop-shadow-on-viewport-edge.png platform(linux,mac) == blend-clipped.yaml blend-clipped.png platform(linux,mac) == filter-drop-shadow-clip.yaml filter-drop-shadow-clip.png -platform(linux,mac) == filter-drop-shadow-clip-2.yaml filter-drop-shadow-clip-2.png +fuzzy(2,10) platform(linux,mac) == filter-drop-shadow-clip-2.yaml filter-drop-shadow-clip-2.png +platform(linux) == filter-drop-shadow-clip-3.yaml filter-drop-shadow-clip-3.png fuzzy(5,100000) == filter-drop-shadow-scaled.yaml filter-drop-shadow-scaled-ref.yaml == filter-segments.yaml filter-segments-ref.yaml == iframe-dropshadow.yaml iframe-dropshadow-ref.yaml From bdf527dce01eaf17c17c33097a0a448718129484 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 31 Mar 2020 23:05:02 +0000 Subject: [PATCH 02/10] Bug 1625220 - Use euclid 0.20.8. r=gw Differential Revision: https://phabricator.services.mozilla.com/D68469 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/17bf8121665a1b6fa9ce8de05b53c9067e9933f9 --- Cargo.lock | 57 +++++++++++++++++++++++----------------- webrender/src/picture.rs | 11 +++----- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0492d948e1..6f69d2b774 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,7 +44,7 @@ name = "app_units" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -53,7 +53,7 @@ name = "approx" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -79,6 +79,11 @@ name = "autocfg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "backtrace" version = "0.3.12" @@ -428,7 +433,7 @@ dependencies = [ name = "direct-composition" version = "0.1.0" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "webrender 0.61.0", @@ -485,10 +490,10 @@ dependencies = [ [[package]] name = "euclid" -version = "0.20.0" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -745,7 +750,7 @@ dependencies = [ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "png 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -822,7 +827,7 @@ name = "line_drawing" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -996,7 +1001,7 @@ name = "num-integer" version = "0.1.38" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1005,7 +1010,7 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1014,13 +1019,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.4" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "num_cpus" @@ -1048,7 +1056,7 @@ name = "ordered-float" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1097,7 +1105,7 @@ dependencies = [ name = "peek-poke" version = "0.2.0" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "peek-poke-derive 0.2.1", ] @@ -1133,9 +1141,9 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1633,7 +1641,7 @@ dependencies = [ name = "tileview" version = "0.1.0" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "webrender 0.61.0", @@ -1821,7 +1829,7 @@ dependencies = [ "core-text 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "cstr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1831,7 +1839,7 @@ dependencies = [ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "plane-split 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "png 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1856,7 +1864,7 @@ dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1874,7 +1882,7 @@ dependencies = [ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "peek-poke 0.2.0", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1965,7 +1973,7 @@ name = "wr_malloc_size_of" version = "0.0.1" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1983,7 +1991,7 @@ dependencies = [ "crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "font-loader 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2074,6 +2082,7 @@ dependencies = [ "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4a1aa4c24c0718a250f0681885c1af91419d242f29eb8f2ab28502d80dbd1" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum backtrace 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eff3830839471718ef8522b9025b399bfb713e25bc220da721364efb660d7d" "checksum backtrace-sys 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "5b3a000b9c543553af61bc01cbfc403b04b5caa9e421033866f2e98061eb3e61" "checksum base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "621fc7ecb8008f86d7fb9b95356cd692ce9514b80a86d85b397f32a22da7b9e2" @@ -2118,7 +2127,7 @@ dependencies = [ "checksum dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0bd1369e02db5e9b842a9b67bce8a2fcc043beafb2ae8a799dd482d46ea1ff0d" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0e6e40ebb0e66918a37b38c7acab4e10d299e0463fe2af5d29b9cc86710cfd2a" -"checksum euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4786521fec183792e755bf32cd0188e4e7628c6d0fcfd51426435b9081a106" +"checksum euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)" = "57d9ae79e19d69ffb5b47b0a744c4215c115dfed4039314c9ca1b8ddc6c333be" "checksum expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c470ccb972f2088549b023db8029ed9da9426f5affbf9b62efff7009ab8ed5b1" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum font-loader 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd330f40acb3016432cbfa4c54b3d6e6e893a538df79d8df8fd8c26e21c36aaa" @@ -2180,7 +2189,7 @@ dependencies = [ "checksum num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac0ea58d64a89d9d6b7688031b3be9358d6c919badcf7fbb0527ccfd891ee45" "checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" "checksum num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e96f040177bb3da242b5b1ecf3f54b5d5af3efbbfb18608977a5d2767b22f10" -"checksum num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775393e285254d2f5004596d69bb8bc1149754570dcc08cf30cabeba67955e28" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "31d20fd2b37e07cf5125be68357b588672e8cefe9a96f8c17a9d46053b3e590d" "checksum opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index 7436d861a7..32abc40b8e 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -4590,15 +4590,10 @@ impl PicturePrimitive { let world_min = map_raster_to_world.map_vector(raster_min); let world_max = map_raster_to_world.map_vector(raster_max); - let top_left = -world_max.max(vec2(0.0, 0.0)); - let bottom_right = -world_min.min(vec2(0.0, 0.0)); - // Grow the clip in the opposite direction of the shadow's offset. - SideOffsets2D::new( - -top_left.y, - bottom_right.x, - bottom_right.y, - -top_left.x, + SideOffsets2D::from_vectors_outer( + -world_max.max(vec2(0.0, 0.0)), + -world_min.min(vec2(0.0, 0.0)), ) } _ => SideOffsets2D::zero(), From ff34e650ed0c9dfc92b420dffa6e1b9072018a64 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 31 Mar 2020 23:05:11 +0000 Subject: [PATCH 03/10] Bug 1625220 - Remove a number of Foo::from_untyped(&bar.to_untyped()) casts. r=gw Differential Revision: https://phabricator.services.mozilla.com/D68470 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/793808082134bce53a0066f55f86c4a470a463ba --- webrender/src/device/gl.rs | 23 ++++++++++------------- webrender/src/picture.rs | 10 +++++----- webrender/src/prim_store/mod.rs | 9 +++++---- webrender/src/renderer.rs | 8 ++++---- webrender/src/screen_capture.rs | 2 +- webrender_api/src/units.rs | 22 ++++++++++++++++++++++ 6 files changed, 47 insertions(+), 27 deletions(-) diff --git a/webrender/src/device/gl.rs b/webrender/src/device/gl.rs index e239caff74..66d44b0ade 100644 --- a/webrender/src/device/gl.rs +++ b/webrender/src/device/gl.rs @@ -1171,7 +1171,7 @@ pub enum DrawTarget { impl DrawTarget { pub fn new_default(size: DeviceIntSize, surface_origin_is_top_left: bool) -> Self { - let total_size = FramebufferIntSize::from_untyped(size.to_untyped()); + let total_size = device_size_as_framebuffer_size(size); DrawTarget::Default { rect: total_size.into(), total_size, @@ -1212,15 +1212,15 @@ impl DrawTarget { /// Returns the dimensions of this draw-target. pub fn dimensions(&self) -> DeviceIntSize { match *self { - DrawTarget::Default { total_size, .. } => DeviceIntSize::from_untyped(total_size.to_untyped()), + DrawTarget::Default { total_size, .. } => total_size.cast_unit(), DrawTarget::Texture { dimensions, .. } => dimensions, - DrawTarget::External { size, .. } => DeviceIntSize::from_untyped(size.to_untyped()), + DrawTarget::External { size, .. } => size.cast_unit(), DrawTarget::NativeSurface { dimensions, .. } => dimensions, } } pub fn to_framebuffer_rect(&self, device_rect: DeviceIntRect) -> FramebufferIntRect { - let mut fb_rect = FramebufferIntRect::from_untyped(&device_rect.to_untyped()); + let mut fb_rect = device_rect_as_framebuffer_rect(&device_rect); match *self { DrawTarget::Default { ref rect, surface_origin_is_top_left, .. } => { // perform a Y-flip here @@ -1255,16 +1255,16 @@ impl DrawTarget { .unwrap_or_else(FramebufferIntRect::zero) } DrawTarget::NativeSurface { offset, .. } => { - FramebufferIntRect::from_untyped(&scissor_rect.translate(offset.to_vector()).to_untyped()) + device_rect_as_framebuffer_rect(&scissor_rect.translate(offset.to_vector())) } DrawTarget::Texture { .. } | DrawTarget::External { .. } => { - FramebufferIntRect::from_untyped(&scissor_rect.to_untyped()) + device_rect_as_framebuffer_rect(&scissor_rect) } } None => { FramebufferIntRect::new( FramebufferIntPoint::zero(), - FramebufferIntSize::from_untyped(dimensions.to_untyped()), + device_size_as_framebuffer_size(dimensions), ) } } @@ -1891,7 +1891,7 @@ impl Device { DrawTarget::Texture { dimensions, fbo_id, with_depth, .. } => { let rect = FramebufferIntRect::new( FramebufferIntPoint::zero(), - FramebufferIntSize::from_untyped(dimensions.to_untyped()), + device_size_as_framebuffer_size(dimensions), ); (fbo_id, rect, with_depth) }, @@ -1901,10 +1901,7 @@ impl Device { DrawTarget::NativeSurface { external_fbo_id, offset, dimensions, .. } => { ( FBOId(external_fbo_id), - FramebufferIntRect::new( - FramebufferIntPoint::from_untyped(offset.to_untyped()), - FramebufferIntSize::from_untyped(dimensions.to_untyped()), - ), + device_rect_as_framebuffer_rect(&DeviceIntRect::new(offset, dimensions)), true ) } @@ -2332,7 +2329,7 @@ impl Device { } else { let rect = FramebufferIntRect::new( FramebufferIntPoint::zero(), - FramebufferIntSize::from_untyped(src.get_dimensions().to_untyped()), + device_size_as_framebuffer_size(src.get_dimensions()), ); for layer in 0..src.layer_count.min(dst.layer_count) as LayerIndex { self.blit_render_target( diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index 32abc40b8e..4120b203ed 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -2395,11 +2395,11 @@ impl TileCacheInstance { self.map_local_to_surface = SpaceMapper::new( self.spatial_node_index, - PictureRect::from_untyped(&pic_rect.to_untyped()), + pic_rect, ); self.map_child_pic_to_surface = SpaceMapper::new( self.spatial_node_index, - PictureRect::from_untyped(&pic_rect.to_untyped()), + pic_rect, ); let pic_to_world_mapper = SpaceMapper::new_with_target( @@ -2430,7 +2430,7 @@ impl TileCacheInstance { ); let clip_chain_instance = frame_state.clip_store.build_clip_chain_instance( - LayoutRect::from_untyped(&pic_rect.to_untyped()), + pic_rect.cast_unit(), &self.map_local_to_surface, &pic_to_world_mapper, frame_context.spatial_tree, @@ -4562,7 +4562,7 @@ impl PicturePrimitive { match self.raster_config { Some(ref mut raster_config) => { - let pic_rect = PictureRect::from_untyped(&self.precise_local_rect.to_untyped()); + let pic_rect = self.precise_local_rect.cast_unit(); let mut device_pixel_scale = frame_state .surfaces[raster_config.surface_index.0] @@ -4579,7 +4579,7 @@ impl PicturePrimitive { let mut max_offset = vec2(0.0, 0.0); let mut min_offset = vec2(0.0, 0.0); for shadow in shadows { - let offset = shadow.offset.cast_unit(); + let offset = layout_vector_as_picture_vector(shadow.offset); max_offset = max_offset.max(offset); min_offset = min_offset.min(offset); } diff --git a/webrender/src/prim_store/mod.rs b/webrender/src/prim_store/mod.rs index ec67bab08f..c9c16df149 100644 --- a/webrender/src/prim_store/mod.rs +++ b/webrender/src/prim_store/mod.rs @@ -312,7 +312,7 @@ impl SpaceMapper where F: fmt::Debug { pub fn unmap(&self, rect: &Rect) -> Option> { match self.kind { CoordinateSpaceMapping::Local => { - Some(Rect::from_untyped(&rect.to_untyped())) + Some(rect.cast_unit()) } CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => { Some(scale_offset.unmap_rect(rect)) @@ -326,7 +326,7 @@ impl SpaceMapper where F: fmt::Debug { pub fn map(&self, rect: &Rect) -> Option> { match self.kind { CoordinateSpaceMapping::Local => { - Some(Rect::from_untyped(&rect.to_untyped())) + Some(rect.cast_unit()) } CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => { Some(scale_offset.map_rect(rect)) @@ -1962,7 +1962,7 @@ impl PrimitiveStore { // relative transforms have changed, which means we need to // re-map the dependencies of any child primitives. world_culling_rect = tile_cache.pre_update( - PictureRect::from_untyped(&pic.estimated_local_rect.to_untyped()), + layout_rect_as_picture_rect(&pic.estimated_local_rect), surface_index, frame_context, frame_state, @@ -4230,7 +4230,8 @@ fn get_clipped_device_rect( let unclipped_raster_rect = { let world_rect = *unclipped * Scale::new(1.0); let raster_rect = world_rect * device_pixel_scale.inv(); - Rect::from_untyped(&raster_rect.to_untyped()) + + raster_rect.cast_unit() }; let unclipped_world_rect = map_to_world.map(&unclipped_raster_rect)?; diff --git a/webrender/src/renderer.rs b/webrender/src/renderer.rs index 00c009c597..4f8fb06395 100644 --- a/webrender/src/renderer.rs +++ b/webrender/src/renderer.rs @@ -6054,7 +6054,7 @@ impl Renderer { let texture_rect = FramebufferIntRect::new( FramebufferIntPoint::zero(), - FramebufferIntSize::from_untyped(source_rect.size.to_untyped()), + source_rect.size.cast_unit(), ); debug_renderer.add_rect( @@ -6193,7 +6193,7 @@ impl Renderer { device.clear_target( Some(tag_color), None, - Some(FramebufferIntRect::from_untyped(&tag_rect.to_untyped())), + Some(tag_rect.cast_unit()), ); // Draw the dimensions onto the tag. @@ -6321,7 +6321,7 @@ impl Renderer { pub fn read_gpu_cache(&mut self) -> (DeviceIntSize, Vec) { let texture = self.gpu_cache_texture.texture.as_ref().unwrap(); - let size = FramebufferIntSize::from_untyped(texture.get_dimensions().to_untyped()); + let size = device_size_as_framebuffer_size(texture.get_dimensions()); let mut texels = vec![0; (size.width * size.height * 16) as usize]; self.device.begin_frame(); self.device.bind_read_target(ReadTarget::from_texture(texture, 0)); @@ -6858,7 +6858,7 @@ impl Renderer { // read from textures directly with `get_tex_image*`. for layer_id in 0 .. texture.get_layer_count() { - let rect = FramebufferIntSize::from_untyped(rect_size.to_untyped()).into(); + let rect = device_size_as_framebuffer_size(rect_size).into(); device.attach_read_texture(texture, layer_id); #[cfg(feature = "png")] diff --git a/webrender/src/screen_capture.rs b/webrender/src/screen_capture.rs index 7eaed714f0..5941f4e8c5 100644 --- a/webrender/src/screen_capture.rs +++ b/webrender/src/screen_capture.rs @@ -290,7 +290,7 @@ impl AsyncScreenshotGrabber { let draw_target_rect = draw_target .to_framebuffer_rect(DeviceIntRect::new(DeviceIntPoint::new(0, 0), dest_size)); - let read_target_rect = FramebufferIntRect::from_untyped(&read_target_rect.to_untyped()); + let read_target_rect = device_rect_as_framebuffer_rect(&read_target_rect); if level == 0 && !device.surface_origin_is_top_left() { device.blit_render_target_invert_y( diff --git a/webrender_api/src/units.rs b/webrender_api/src/units.rs index 00546acd70..1c4f602026 100644 --- a/webrender_api/src/units.rs +++ b/webrender_api/src/units.rs @@ -299,3 +299,25 @@ impl RectExt for Rect { self.max() } } + +// A few helpers to convert to cast between coordinate spaces that are often equivalent. + +#[inline] +pub fn layout_rect_as_picture_rect(layout_rect: &LayoutRect) -> PictureRect { + layout_rect.cast_unit() +} + +#[inline] +pub fn layout_vector_as_picture_vector(layout_vector: LayoutVector2D) -> PictureVector2D { + layout_vector.cast_unit() +} + +#[inline] +pub fn device_size_as_framebuffer_size(framebuffer_size: DeviceIntSize) -> FramebufferIntSize { + framebuffer_size.cast_unit() +} + +#[inline] +pub fn device_rect_as_framebuffer_rect(framebuffer_rect: &DeviceIntRect) -> FramebufferIntRect { + framebuffer_rect.cast_unit() +} From bce83b69c4eb9430ba4241bfe1f55b67e1bdb8e6 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 31 Mar 2020 23:05:20 +0000 Subject: [PATCH 04/10] Bug 1625220 - Add autocfg to duplicate exceptions. r=gw num-traits depends on 1.0.0 while rand depends on version 0.1.2. Depends on D68470 Differential Revision: https://phabricator.services.mozilla.com/D68856 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/fbeb908b3513f23cb815b207622f492279eff175 --- servo-tidy.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/servo-tidy.toml b/servo-tidy.toml index b45489f8d5..42f61bdd26 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -6,6 +6,7 @@ check-alphabetical-order = false [ignore] # Ignored packages with duplicated versions packages = [ + "autocfg", "core-graphics", "core-text", "gl_generator", From f8b4f794a717e6d649fb8ee506de00d98839e47b Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 31 Mar 2020 23:05:28 +0000 Subject: [PATCH 05/10] Bug 1595768 - Don't evict blank glyphs to avoid re-rasterizing them continuously. r=gw Depends on D68856 Differential Revision: https://phabricator.services.mozilla.com/D68857 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/f777b2dc12235eb7668fb639f629db1017ad39cc --- webrender/src/glyph_cache.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webrender/src/glyph_cache.rs b/webrender/src/glyph_cache.rs index e3629b1d23..faa0d768e9 100644 --- a/webrender/src/glyph_cache.rs +++ b/webrender/src/glyph_cache.rs @@ -39,9 +39,7 @@ impl GlyphCacheEntry { GlyphCacheEntry::Cached(ref glyph) => { texture_cache.get_allocated_size(&glyph.texture_cache_handle) } - GlyphCacheEntry::Pending => Some(0), - // If the cache only has blank glyphs left, just get rid of it. - GlyphCacheEntry::Blank => None, + GlyphCacheEntry::Pending | GlyphCacheEntry::Blank => Some(0), } } From e1d8a9c283e43651301eb1f4486924e3548eb830 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 31 Mar 2020 23:05:37 +0000 Subject: [PATCH 06/10] Bug 1595768 - Don't track empty items in the texture cache. r=gw This was added in a previous patch but it seems that we don't need it if invalid glyphs can be treated as blank glyph cache items. Depends on D68857 Differential Revision: https://phabricator.services.mozilla.com/D68858 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/e3f5c752e57fb82c03a9e8fb288907599b6d9489 --- webrender/src/texture_cache.rs | 40 +++++----------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/webrender/src/texture_cache.rs b/webrender/src/texture_cache.rs index bf8311ba91..f177c9f491 100644 --- a/webrender/src/texture_cache.rs +++ b/webrender/src/texture_cache.rs @@ -25,7 +25,6 @@ use std::cmp; use std::mem; use std::time::{Duration, SystemTime}; use std::rc::Rc; -use euclid::size2; /// The size of each region/layer in shared cache texture arrays. pub const TEXTURE_REGION_DIMENSIONS: i32 = 512; @@ -62,13 +61,12 @@ enum EntryDetails { /// The layer index of the texture array. layer_index: usize, }, - Empty, } impl EntryDetails { fn describe(&self) -> (LayerIndex, DeviceIntPoint) { match *self { - EntryDetails::Standalone | EntryDetails::Empty => (0, DeviceIntPoint::zero()), + EntryDetails::Standalone => (0, DeviceIntPoint::zero()), EntryDetails::Picture { layer_index, .. } => (layer_index, DeviceIntPoint::zero()), EntryDetails::Cache { origin, layer_index } => (layer_index, origin), } @@ -82,7 +80,6 @@ impl EntryDetails { EntryDetails::Standalone => EntryKind::Standalone, EntryDetails::Picture { .. } => EntryKind::Picture, EntryDetails::Cache { .. } => EntryKind::Shared, - EntryDetails::Empty => EntryKind::Empty, } } } @@ -93,7 +90,6 @@ enum EntryKind { Standalone, Picture, Shared, - Empty, } #[derive(Debug)] @@ -154,24 +150,6 @@ impl CacheEntry { } } - // Create a new entry for a standalone texture. - fn new_empty(last_access: FrameStamp) -> Self { - CacheEntry { - size: size2(0, 0), - user_data: [0.0; 3], - last_access, - details: EntryDetails::Empty, - texture_id: CacheTextureId(std::u64::MAX), - input_format: ImageFormat::BGRA8, - filter: TextureFilter::Linear, - swizzle: Swizzle::default(), - uv_rect_handle: GpuCacheHandle::new(), - eviction_notice: None, - uv_rect_kind: UvRectKind::Rect, - eviction: Eviction::Auto, - } - } - // Update the GPU cache for this texture cache entry. // This ensures that the UV rect, and texture layer index // are up to date in the GPU cache for vertex shaders @@ -499,8 +477,6 @@ struct EntryHandles { picture: Vec>, /// Handles for each shared texture cache entry. shared: Vec>, - /// Handles for each shared texture cache entry. - empty: Vec>, } impl EntryHandles { @@ -510,7 +486,6 @@ impl EntryHandles { EntryKind::Standalone => &mut self.standalone, EntryKind::Picture => &mut self.picture, EntryKind::Shared => &mut self.shared, - EntryKind::Empty => &mut self.empty, } } } @@ -1302,8 +1277,7 @@ impl TextureCache { } region.free(origin, &mut unit.empty_regions); } - EntryDetails::Empty => {} - } + } } /// Check if we can allocate this entry without growing any of the texture cache arrays. @@ -1407,8 +1381,7 @@ impl TextureCache { // case, add support for storing these in a standalone // texture array. if descriptor.size.width > TEXTURE_REGION_DIMENSIONS || - descriptor.size.height > TEXTURE_REGION_DIMENSIONS || - descriptor.size.is_empty_or_negative() + descriptor.size.height > TEXTURE_REGION_DIMENSIONS { allowed_in_shared_cache = false; } @@ -1469,9 +1442,8 @@ impl TextureCache { &mut self, params: &CacheAllocParams, ) -> CacheEntry { - if params.descriptor.size.is_empty_or_negative() { - return CacheEntry::new_empty(self.now); - } + assert!(!params.descriptor.size.is_empty_or_negative()); + // If this image doesn't qualify to go in the shared (batching) cache, // allocate a standalone entry. if self.is_allowed_in_shared_cache(params.filter, ¶ms.descriptor) { @@ -1510,7 +1482,7 @@ impl TextureCache { let (from, to) = match new_kind { EntryKind::Standalone => (&mut self.doc_data.handles.shared, &mut self.doc_data.handles.standalone), - EntryKind::Picture | EntryKind::Empty => unreachable!(), + EntryKind::Picture => unreachable!(), EntryKind::Shared => (&mut self.doc_data.handles.standalone, &mut self.doc_data.handles.shared), }; From 614ddb62c940350b4114e8ba69cf1557159d62fa Mon Sep 17 00:00:00 2001 From: Stefan Hindli Date: Tue, 31 Mar 2020 23:05:45 +0000 Subject: [PATCH 07/10] Backed out 3 changesets (bug 1625220) for causing wrench bustages CLOSED TREE Backed out changeset fbeb908b3513 (bug 1625220) Backed out changeset 793808082134 (bug 1625220) Backed out changeset 17bf8121665a (bug 1625220) [ghsync] From https://hg.mozilla.org/mozilla-central/rev/ce7721dc3d78a4aa738c1c0b8f6e78e8bbd111be --- Cargo.lock | 57 ++++++++++++++------------------- servo-tidy.toml | 1 - webrender/src/device/gl.rs | 23 +++++++------ webrender/src/picture.rs | 21 +++++++----- webrender/src/prim_store/mod.rs | 9 +++--- webrender/src/renderer.rs | 8 ++--- webrender/src/screen_capture.rs | 2 +- webrender_api/src/units.rs | 22 ------------- 8 files changed, 59 insertions(+), 84 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f69d2b774..0492d948e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,7 +44,7 @@ name = "app_units" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -53,7 +53,7 @@ name = "approx" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -79,11 +79,6 @@ name = "autocfg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "autocfg" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "backtrace" version = "0.3.12" @@ -433,7 +428,7 @@ dependencies = [ name = "direct-composition" version = "0.1.0" dependencies = [ - "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "webrender 0.61.0", @@ -490,10 +485,10 @@ dependencies = [ [[package]] name = "euclid" -version = "0.20.8" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -750,7 +745,7 @@ dependencies = [ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "png 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -827,7 +822,7 @@ name = "line_drawing" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1001,7 +996,7 @@ name = "num-integer" version = "0.1.38" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1010,7 +1005,7 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1019,16 +1014,13 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.11" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "num_cpus" @@ -1056,7 +1048,7 @@ name = "ordered-float" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1105,7 +1097,7 @@ dependencies = [ name = "peek-poke" version = "0.2.0" dependencies = [ - "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "peek-poke-derive 0.2.1", ] @@ -1141,9 +1133,9 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1641,7 +1633,7 @@ dependencies = [ name = "tileview" version = "0.1.0" dependencies = [ - "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "webrender 0.61.0", @@ -1829,7 +1821,7 @@ dependencies = [ "core-text 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "cstr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1839,7 +1831,7 @@ dependencies = [ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "plane-split 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "png 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1864,7 +1856,7 @@ dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1882,7 +1874,7 @@ dependencies = [ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "peek-poke 0.2.0", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1973,7 +1965,7 @@ name = "wr_malloc_size_of" version = "0.0.1" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1991,7 +1983,7 @@ dependencies = [ "crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "font-loader 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2082,7 +2074,6 @@ dependencies = [ "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4a1aa4c24c0718a250f0681885c1af91419d242f29eb8f2ab28502d80dbd1" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" -"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum backtrace 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eff3830839471718ef8522b9025b399bfb713e25bc220da721364efb660d7d" "checksum backtrace-sys 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "5b3a000b9c543553af61bc01cbfc403b04b5caa9e421033866f2e98061eb3e61" "checksum base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "621fc7ecb8008f86d7fb9b95356cd692ce9514b80a86d85b397f32a22da7b9e2" @@ -2127,7 +2118,7 @@ dependencies = [ "checksum dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0bd1369e02db5e9b842a9b67bce8a2fcc043beafb2ae8a799dd482d46ea1ff0d" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0e6e40ebb0e66918a37b38c7acab4e10d299e0463fe2af5d29b9cc86710cfd2a" -"checksum euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)" = "57d9ae79e19d69ffb5b47b0a744c4215c115dfed4039314c9ca1b8ddc6c333be" +"checksum euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4786521fec183792e755bf32cd0188e4e7628c6d0fcfd51426435b9081a106" "checksum expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c470ccb972f2088549b023db8029ed9da9426f5affbf9b62efff7009ab8ed5b1" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum font-loader 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd330f40acb3016432cbfa4c54b3d6e6e893a538df79d8df8fd8c26e21c36aaa" @@ -2189,7 +2180,7 @@ dependencies = [ "checksum num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac0ea58d64a89d9d6b7688031b3be9358d6c919badcf7fbb0527ccfd891ee45" "checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" "checksum num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e96f040177bb3da242b5b1ecf3f54b5d5af3efbbfb18608977a5d2767b22f10" -"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +"checksum num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775393e285254d2f5004596d69bb8bc1149754570dcc08cf30cabeba67955e28" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "31d20fd2b37e07cf5125be68357b588672e8cefe9a96f8c17a9d46053b3e590d" "checksum opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" diff --git a/servo-tidy.toml b/servo-tidy.toml index 42f61bdd26..b45489f8d5 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -6,7 +6,6 @@ check-alphabetical-order = false [ignore] # Ignored packages with duplicated versions packages = [ - "autocfg", "core-graphics", "core-text", "gl_generator", diff --git a/webrender/src/device/gl.rs b/webrender/src/device/gl.rs index 66d44b0ade..e239caff74 100644 --- a/webrender/src/device/gl.rs +++ b/webrender/src/device/gl.rs @@ -1171,7 +1171,7 @@ pub enum DrawTarget { impl DrawTarget { pub fn new_default(size: DeviceIntSize, surface_origin_is_top_left: bool) -> Self { - let total_size = device_size_as_framebuffer_size(size); + let total_size = FramebufferIntSize::from_untyped(size.to_untyped()); DrawTarget::Default { rect: total_size.into(), total_size, @@ -1212,15 +1212,15 @@ impl DrawTarget { /// Returns the dimensions of this draw-target. pub fn dimensions(&self) -> DeviceIntSize { match *self { - DrawTarget::Default { total_size, .. } => total_size.cast_unit(), + DrawTarget::Default { total_size, .. } => DeviceIntSize::from_untyped(total_size.to_untyped()), DrawTarget::Texture { dimensions, .. } => dimensions, - DrawTarget::External { size, .. } => size.cast_unit(), + DrawTarget::External { size, .. } => DeviceIntSize::from_untyped(size.to_untyped()), DrawTarget::NativeSurface { dimensions, .. } => dimensions, } } pub fn to_framebuffer_rect(&self, device_rect: DeviceIntRect) -> FramebufferIntRect { - let mut fb_rect = device_rect_as_framebuffer_rect(&device_rect); + let mut fb_rect = FramebufferIntRect::from_untyped(&device_rect.to_untyped()); match *self { DrawTarget::Default { ref rect, surface_origin_is_top_left, .. } => { // perform a Y-flip here @@ -1255,16 +1255,16 @@ impl DrawTarget { .unwrap_or_else(FramebufferIntRect::zero) } DrawTarget::NativeSurface { offset, .. } => { - device_rect_as_framebuffer_rect(&scissor_rect.translate(offset.to_vector())) + FramebufferIntRect::from_untyped(&scissor_rect.translate(offset.to_vector()).to_untyped()) } DrawTarget::Texture { .. } | DrawTarget::External { .. } => { - device_rect_as_framebuffer_rect(&scissor_rect) + FramebufferIntRect::from_untyped(&scissor_rect.to_untyped()) } } None => { FramebufferIntRect::new( FramebufferIntPoint::zero(), - device_size_as_framebuffer_size(dimensions), + FramebufferIntSize::from_untyped(dimensions.to_untyped()), ) } } @@ -1891,7 +1891,7 @@ impl Device { DrawTarget::Texture { dimensions, fbo_id, with_depth, .. } => { let rect = FramebufferIntRect::new( FramebufferIntPoint::zero(), - device_size_as_framebuffer_size(dimensions), + FramebufferIntSize::from_untyped(dimensions.to_untyped()), ); (fbo_id, rect, with_depth) }, @@ -1901,7 +1901,10 @@ impl Device { DrawTarget::NativeSurface { external_fbo_id, offset, dimensions, .. } => { ( FBOId(external_fbo_id), - device_rect_as_framebuffer_rect(&DeviceIntRect::new(offset, dimensions)), + FramebufferIntRect::new( + FramebufferIntPoint::from_untyped(offset.to_untyped()), + FramebufferIntSize::from_untyped(dimensions.to_untyped()), + ), true ) } @@ -2329,7 +2332,7 @@ impl Device { } else { let rect = FramebufferIntRect::new( FramebufferIntPoint::zero(), - device_size_as_framebuffer_size(src.get_dimensions()), + FramebufferIntSize::from_untyped(src.get_dimensions().to_untyped()), ); for layer in 0..src.layer_count.min(dst.layer_count) as LayerIndex { self.blit_render_target( diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index 4120b203ed..7436d861a7 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -2395,11 +2395,11 @@ impl TileCacheInstance { self.map_local_to_surface = SpaceMapper::new( self.spatial_node_index, - pic_rect, + PictureRect::from_untyped(&pic_rect.to_untyped()), ); self.map_child_pic_to_surface = SpaceMapper::new( self.spatial_node_index, - pic_rect, + PictureRect::from_untyped(&pic_rect.to_untyped()), ); let pic_to_world_mapper = SpaceMapper::new_with_target( @@ -2430,7 +2430,7 @@ impl TileCacheInstance { ); let clip_chain_instance = frame_state.clip_store.build_clip_chain_instance( - pic_rect.cast_unit(), + LayoutRect::from_untyped(&pic_rect.to_untyped()), &self.map_local_to_surface, &pic_to_world_mapper, frame_context.spatial_tree, @@ -4562,7 +4562,7 @@ impl PicturePrimitive { match self.raster_config { Some(ref mut raster_config) => { - let pic_rect = self.precise_local_rect.cast_unit(); + let pic_rect = PictureRect::from_untyped(&self.precise_local_rect.to_untyped()); let mut device_pixel_scale = frame_state .surfaces[raster_config.surface_index.0] @@ -4579,7 +4579,7 @@ impl PicturePrimitive { let mut max_offset = vec2(0.0, 0.0); let mut min_offset = vec2(0.0, 0.0); for shadow in shadows { - let offset = layout_vector_as_picture_vector(shadow.offset); + let offset = shadow.offset.cast_unit(); max_offset = max_offset.max(offset); min_offset = min_offset.min(offset); } @@ -4590,10 +4590,15 @@ impl PicturePrimitive { let world_min = map_raster_to_world.map_vector(raster_min); let world_max = map_raster_to_world.map_vector(raster_max); + let top_left = -world_max.max(vec2(0.0, 0.0)); + let bottom_right = -world_min.min(vec2(0.0, 0.0)); + // Grow the clip in the opposite direction of the shadow's offset. - SideOffsets2D::from_vectors_outer( - -world_max.max(vec2(0.0, 0.0)), - -world_min.min(vec2(0.0, 0.0)), + SideOffsets2D::new( + -top_left.y, + bottom_right.x, + bottom_right.y, + -top_left.x, ) } _ => SideOffsets2D::zero(), diff --git a/webrender/src/prim_store/mod.rs b/webrender/src/prim_store/mod.rs index c9c16df149..ec67bab08f 100644 --- a/webrender/src/prim_store/mod.rs +++ b/webrender/src/prim_store/mod.rs @@ -312,7 +312,7 @@ impl SpaceMapper where F: fmt::Debug { pub fn unmap(&self, rect: &Rect) -> Option> { match self.kind { CoordinateSpaceMapping::Local => { - Some(rect.cast_unit()) + Some(Rect::from_untyped(&rect.to_untyped())) } CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => { Some(scale_offset.unmap_rect(rect)) @@ -326,7 +326,7 @@ impl SpaceMapper where F: fmt::Debug { pub fn map(&self, rect: &Rect) -> Option> { match self.kind { CoordinateSpaceMapping::Local => { - Some(rect.cast_unit()) + Some(Rect::from_untyped(&rect.to_untyped())) } CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => { Some(scale_offset.map_rect(rect)) @@ -1962,7 +1962,7 @@ impl PrimitiveStore { // relative transforms have changed, which means we need to // re-map the dependencies of any child primitives. world_culling_rect = tile_cache.pre_update( - layout_rect_as_picture_rect(&pic.estimated_local_rect), + PictureRect::from_untyped(&pic.estimated_local_rect.to_untyped()), surface_index, frame_context, frame_state, @@ -4230,8 +4230,7 @@ fn get_clipped_device_rect( let unclipped_raster_rect = { let world_rect = *unclipped * Scale::new(1.0); let raster_rect = world_rect * device_pixel_scale.inv(); - - raster_rect.cast_unit() + Rect::from_untyped(&raster_rect.to_untyped()) }; let unclipped_world_rect = map_to_world.map(&unclipped_raster_rect)?; diff --git a/webrender/src/renderer.rs b/webrender/src/renderer.rs index 4f8fb06395..00c009c597 100644 --- a/webrender/src/renderer.rs +++ b/webrender/src/renderer.rs @@ -6054,7 +6054,7 @@ impl Renderer { let texture_rect = FramebufferIntRect::new( FramebufferIntPoint::zero(), - source_rect.size.cast_unit(), + FramebufferIntSize::from_untyped(source_rect.size.to_untyped()), ); debug_renderer.add_rect( @@ -6193,7 +6193,7 @@ impl Renderer { device.clear_target( Some(tag_color), None, - Some(tag_rect.cast_unit()), + Some(FramebufferIntRect::from_untyped(&tag_rect.to_untyped())), ); // Draw the dimensions onto the tag. @@ -6321,7 +6321,7 @@ impl Renderer { pub fn read_gpu_cache(&mut self) -> (DeviceIntSize, Vec) { let texture = self.gpu_cache_texture.texture.as_ref().unwrap(); - let size = device_size_as_framebuffer_size(texture.get_dimensions()); + let size = FramebufferIntSize::from_untyped(texture.get_dimensions().to_untyped()); let mut texels = vec![0; (size.width * size.height * 16) as usize]; self.device.begin_frame(); self.device.bind_read_target(ReadTarget::from_texture(texture, 0)); @@ -6858,7 +6858,7 @@ impl Renderer { // read from textures directly with `get_tex_image*`. for layer_id in 0 .. texture.get_layer_count() { - let rect = device_size_as_framebuffer_size(rect_size).into(); + let rect = FramebufferIntSize::from_untyped(rect_size.to_untyped()).into(); device.attach_read_texture(texture, layer_id); #[cfg(feature = "png")] diff --git a/webrender/src/screen_capture.rs b/webrender/src/screen_capture.rs index 5941f4e8c5..7eaed714f0 100644 --- a/webrender/src/screen_capture.rs +++ b/webrender/src/screen_capture.rs @@ -290,7 +290,7 @@ impl AsyncScreenshotGrabber { let draw_target_rect = draw_target .to_framebuffer_rect(DeviceIntRect::new(DeviceIntPoint::new(0, 0), dest_size)); - let read_target_rect = device_rect_as_framebuffer_rect(&read_target_rect); + let read_target_rect = FramebufferIntRect::from_untyped(&read_target_rect.to_untyped()); if level == 0 && !device.surface_origin_is_top_left() { device.blit_render_target_invert_y( diff --git a/webrender_api/src/units.rs b/webrender_api/src/units.rs index 1c4f602026..00546acd70 100644 --- a/webrender_api/src/units.rs +++ b/webrender_api/src/units.rs @@ -299,25 +299,3 @@ impl RectExt for Rect { self.max() } } - -// A few helpers to convert to cast between coordinate spaces that are often equivalent. - -#[inline] -pub fn layout_rect_as_picture_rect(layout_rect: &LayoutRect) -> PictureRect { - layout_rect.cast_unit() -} - -#[inline] -pub fn layout_vector_as_picture_vector(layout_vector: LayoutVector2D) -> PictureVector2D { - layout_vector.cast_unit() -} - -#[inline] -pub fn device_size_as_framebuffer_size(framebuffer_size: DeviceIntSize) -> FramebufferIntSize { - framebuffer_size.cast_unit() -} - -#[inline] -pub fn device_rect_as_framebuffer_rect(framebuffer_rect: &DeviceIntRect) -> FramebufferIntRect { - framebuffer_rect.cast_unit() -} From f6897a068601a687cbeeef69996ae73645a9420e Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 31 Mar 2020 23:05:54 +0000 Subject: [PATCH 08/10] Bug 1625220 - Use euclid 0.20.8. r=gw Differential Revision: https://phabricator.services.mozilla.com/D68469 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/3ed9bedb3ae9582db369f2d2aa2498972277e48d --- Cargo.lock | 59 +++++++++++++++++++++++----------------- webrender/src/picture.rs | 11 ++------ 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0492d948e1..36c79d5cea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,7 +44,7 @@ name = "app_units" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -53,7 +53,7 @@ name = "approx" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -79,6 +79,11 @@ name = "autocfg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "backtrace" version = "0.3.12" @@ -428,7 +433,7 @@ dependencies = [ name = "direct-composition" version = "0.1.0" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "webrender 0.61.0", @@ -485,10 +490,10 @@ dependencies = [ [[package]] name = "euclid" -version = "0.20.0" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -745,7 +750,7 @@ dependencies = [ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "png 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -822,7 +827,7 @@ name = "line_drawing" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -988,7 +993,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -996,7 +1001,7 @@ name = "num-integer" version = "0.1.38" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1005,7 +1010,7 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1014,13 +1019,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.4" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "num_cpus" @@ -1048,7 +1056,7 @@ name = "ordered-float" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1097,7 +1105,7 @@ dependencies = [ name = "peek-poke" version = "0.2.0" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "peek-poke-derive 0.2.1", ] @@ -1133,9 +1141,9 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1633,7 +1641,7 @@ dependencies = [ name = "tileview" version = "0.1.0" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "webrender 0.61.0", @@ -1821,7 +1829,7 @@ dependencies = [ "core-text 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "cstr 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1831,7 +1839,7 @@ dependencies = [ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "plane-split 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "png 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1856,7 +1864,7 @@ dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1874,7 +1882,7 @@ dependencies = [ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "peek-poke 0.2.0", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1965,7 +1973,7 @@ name = "wr_malloc_size_of" version = "0.0.1" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1983,7 +1991,7 @@ dependencies = [ "crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)", "font-loader 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2074,6 +2082,7 @@ dependencies = [ "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4a1aa4c24c0718a250f0681885c1af91419d242f29eb8f2ab28502d80dbd1" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum backtrace 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eff3830839471718ef8522b9025b399bfb713e25bc220da721364efb660d7d" "checksum backtrace-sys 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "5b3a000b9c543553af61bc01cbfc403b04b5caa9e421033866f2e98061eb3e61" "checksum base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "621fc7ecb8008f86d7fb9b95356cd692ce9514b80a86d85b397f32a22da7b9e2" @@ -2118,7 +2127,7 @@ dependencies = [ "checksum dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0bd1369e02db5e9b842a9b67bce8a2fcc043beafb2ae8a799dd482d46ea1ff0d" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0e6e40ebb0e66918a37b38c7acab4e10d299e0463fe2af5d29b9cc86710cfd2a" -"checksum euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4786521fec183792e755bf32cd0188e4e7628c6d0fcfd51426435b9081a106" +"checksum euclid 0.20.8 (registry+https://github.com/rust-lang/crates.io-index)" = "57d9ae79e19d69ffb5b47b0a744c4215c115dfed4039314c9ca1b8ddc6c333be" "checksum expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c470ccb972f2088549b023db8029ed9da9426f5affbf9b62efff7009ab8ed5b1" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum font-loader 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd330f40acb3016432cbfa4c54b3d6e6e893a538df79d8df8fd8c26e21c36aaa" @@ -2180,7 +2189,7 @@ dependencies = [ "checksum num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac0ea58d64a89d9d6b7688031b3be9358d6c919badcf7fbb0527ccfd891ee45" "checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" "checksum num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e96f040177bb3da242b5b1ecf3f54b5d5af3efbbfb18608977a5d2767b22f10" -"checksum num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775393e285254d2f5004596d69bb8bc1149754570dcc08cf30cabeba67955e28" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "31d20fd2b37e07cf5125be68357b588672e8cefe9a96f8c17a9d46053b3e590d" "checksum opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682" diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index 7436d861a7..32abc40b8e 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -4590,15 +4590,10 @@ impl PicturePrimitive { let world_min = map_raster_to_world.map_vector(raster_min); let world_max = map_raster_to_world.map_vector(raster_max); - let top_left = -world_max.max(vec2(0.0, 0.0)); - let bottom_right = -world_min.min(vec2(0.0, 0.0)); - // Grow the clip in the opposite direction of the shadow's offset. - SideOffsets2D::new( - -top_left.y, - bottom_right.x, - bottom_right.y, - -top_left.x, + SideOffsets2D::from_vectors_outer( + -world_max.max(vec2(0.0, 0.0)), + -world_min.min(vec2(0.0, 0.0)), ) } _ => SideOffsets2D::zero(), From 66bc29812ec68bc75f44f7400e75d30001dbc73f Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 31 Mar 2020 23:06:03 +0000 Subject: [PATCH 09/10] Bug 1625220 - Remove a number of Foo::from_untyped(&bar.to_untyped()) casts. r=gw Differential Revision: https://phabricator.services.mozilla.com/D68470 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/fad8d928551db2cdedd01bf22039d7f0cf2d783c --- webrender/src/device/gl.rs | 23 ++++++++++------------- webrender/src/picture.rs | 10 +++++----- webrender/src/prim_store/mod.rs | 9 +++++---- webrender/src/renderer.rs | 8 ++++---- webrender/src/screen_capture.rs | 2 +- webrender_api/src/units.rs | 22 ++++++++++++++++++++++ 6 files changed, 47 insertions(+), 27 deletions(-) diff --git a/webrender/src/device/gl.rs b/webrender/src/device/gl.rs index e239caff74..66d44b0ade 100644 --- a/webrender/src/device/gl.rs +++ b/webrender/src/device/gl.rs @@ -1171,7 +1171,7 @@ pub enum DrawTarget { impl DrawTarget { pub fn new_default(size: DeviceIntSize, surface_origin_is_top_left: bool) -> Self { - let total_size = FramebufferIntSize::from_untyped(size.to_untyped()); + let total_size = device_size_as_framebuffer_size(size); DrawTarget::Default { rect: total_size.into(), total_size, @@ -1212,15 +1212,15 @@ impl DrawTarget { /// Returns the dimensions of this draw-target. pub fn dimensions(&self) -> DeviceIntSize { match *self { - DrawTarget::Default { total_size, .. } => DeviceIntSize::from_untyped(total_size.to_untyped()), + DrawTarget::Default { total_size, .. } => total_size.cast_unit(), DrawTarget::Texture { dimensions, .. } => dimensions, - DrawTarget::External { size, .. } => DeviceIntSize::from_untyped(size.to_untyped()), + DrawTarget::External { size, .. } => size.cast_unit(), DrawTarget::NativeSurface { dimensions, .. } => dimensions, } } pub fn to_framebuffer_rect(&self, device_rect: DeviceIntRect) -> FramebufferIntRect { - let mut fb_rect = FramebufferIntRect::from_untyped(&device_rect.to_untyped()); + let mut fb_rect = device_rect_as_framebuffer_rect(&device_rect); match *self { DrawTarget::Default { ref rect, surface_origin_is_top_left, .. } => { // perform a Y-flip here @@ -1255,16 +1255,16 @@ impl DrawTarget { .unwrap_or_else(FramebufferIntRect::zero) } DrawTarget::NativeSurface { offset, .. } => { - FramebufferIntRect::from_untyped(&scissor_rect.translate(offset.to_vector()).to_untyped()) + device_rect_as_framebuffer_rect(&scissor_rect.translate(offset.to_vector())) } DrawTarget::Texture { .. } | DrawTarget::External { .. } => { - FramebufferIntRect::from_untyped(&scissor_rect.to_untyped()) + device_rect_as_framebuffer_rect(&scissor_rect) } } None => { FramebufferIntRect::new( FramebufferIntPoint::zero(), - FramebufferIntSize::from_untyped(dimensions.to_untyped()), + device_size_as_framebuffer_size(dimensions), ) } } @@ -1891,7 +1891,7 @@ impl Device { DrawTarget::Texture { dimensions, fbo_id, with_depth, .. } => { let rect = FramebufferIntRect::new( FramebufferIntPoint::zero(), - FramebufferIntSize::from_untyped(dimensions.to_untyped()), + device_size_as_framebuffer_size(dimensions), ); (fbo_id, rect, with_depth) }, @@ -1901,10 +1901,7 @@ impl Device { DrawTarget::NativeSurface { external_fbo_id, offset, dimensions, .. } => { ( FBOId(external_fbo_id), - FramebufferIntRect::new( - FramebufferIntPoint::from_untyped(offset.to_untyped()), - FramebufferIntSize::from_untyped(dimensions.to_untyped()), - ), + device_rect_as_framebuffer_rect(&DeviceIntRect::new(offset, dimensions)), true ) } @@ -2332,7 +2329,7 @@ impl Device { } else { let rect = FramebufferIntRect::new( FramebufferIntPoint::zero(), - FramebufferIntSize::from_untyped(src.get_dimensions().to_untyped()), + device_size_as_framebuffer_size(src.get_dimensions()), ); for layer in 0..src.layer_count.min(dst.layer_count) as LayerIndex { self.blit_render_target( diff --git a/webrender/src/picture.rs b/webrender/src/picture.rs index 32abc40b8e..4120b203ed 100644 --- a/webrender/src/picture.rs +++ b/webrender/src/picture.rs @@ -2395,11 +2395,11 @@ impl TileCacheInstance { self.map_local_to_surface = SpaceMapper::new( self.spatial_node_index, - PictureRect::from_untyped(&pic_rect.to_untyped()), + pic_rect, ); self.map_child_pic_to_surface = SpaceMapper::new( self.spatial_node_index, - PictureRect::from_untyped(&pic_rect.to_untyped()), + pic_rect, ); let pic_to_world_mapper = SpaceMapper::new_with_target( @@ -2430,7 +2430,7 @@ impl TileCacheInstance { ); let clip_chain_instance = frame_state.clip_store.build_clip_chain_instance( - LayoutRect::from_untyped(&pic_rect.to_untyped()), + pic_rect.cast_unit(), &self.map_local_to_surface, &pic_to_world_mapper, frame_context.spatial_tree, @@ -4562,7 +4562,7 @@ impl PicturePrimitive { match self.raster_config { Some(ref mut raster_config) => { - let pic_rect = PictureRect::from_untyped(&self.precise_local_rect.to_untyped()); + let pic_rect = self.precise_local_rect.cast_unit(); let mut device_pixel_scale = frame_state .surfaces[raster_config.surface_index.0] @@ -4579,7 +4579,7 @@ impl PicturePrimitive { let mut max_offset = vec2(0.0, 0.0); let mut min_offset = vec2(0.0, 0.0); for shadow in shadows { - let offset = shadow.offset.cast_unit(); + let offset = layout_vector_as_picture_vector(shadow.offset); max_offset = max_offset.max(offset); min_offset = min_offset.min(offset); } diff --git a/webrender/src/prim_store/mod.rs b/webrender/src/prim_store/mod.rs index ec67bab08f..c9c16df149 100644 --- a/webrender/src/prim_store/mod.rs +++ b/webrender/src/prim_store/mod.rs @@ -312,7 +312,7 @@ impl SpaceMapper where F: fmt::Debug { pub fn unmap(&self, rect: &Rect) -> Option> { match self.kind { CoordinateSpaceMapping::Local => { - Some(Rect::from_untyped(&rect.to_untyped())) + Some(rect.cast_unit()) } CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => { Some(scale_offset.unmap_rect(rect)) @@ -326,7 +326,7 @@ impl SpaceMapper where F: fmt::Debug { pub fn map(&self, rect: &Rect) -> Option> { match self.kind { CoordinateSpaceMapping::Local => { - Some(Rect::from_untyped(&rect.to_untyped())) + Some(rect.cast_unit()) } CoordinateSpaceMapping::ScaleOffset(ref scale_offset) => { Some(scale_offset.map_rect(rect)) @@ -1962,7 +1962,7 @@ impl PrimitiveStore { // relative transforms have changed, which means we need to // re-map the dependencies of any child primitives. world_culling_rect = tile_cache.pre_update( - PictureRect::from_untyped(&pic.estimated_local_rect.to_untyped()), + layout_rect_as_picture_rect(&pic.estimated_local_rect), surface_index, frame_context, frame_state, @@ -4230,7 +4230,8 @@ fn get_clipped_device_rect( let unclipped_raster_rect = { let world_rect = *unclipped * Scale::new(1.0); let raster_rect = world_rect * device_pixel_scale.inv(); - Rect::from_untyped(&raster_rect.to_untyped()) + + raster_rect.cast_unit() }; let unclipped_world_rect = map_to_world.map(&unclipped_raster_rect)?; diff --git a/webrender/src/renderer.rs b/webrender/src/renderer.rs index 00c009c597..4f8fb06395 100644 --- a/webrender/src/renderer.rs +++ b/webrender/src/renderer.rs @@ -6054,7 +6054,7 @@ impl Renderer { let texture_rect = FramebufferIntRect::new( FramebufferIntPoint::zero(), - FramebufferIntSize::from_untyped(source_rect.size.to_untyped()), + source_rect.size.cast_unit(), ); debug_renderer.add_rect( @@ -6193,7 +6193,7 @@ impl Renderer { device.clear_target( Some(tag_color), None, - Some(FramebufferIntRect::from_untyped(&tag_rect.to_untyped())), + Some(tag_rect.cast_unit()), ); // Draw the dimensions onto the tag. @@ -6321,7 +6321,7 @@ impl Renderer { pub fn read_gpu_cache(&mut self) -> (DeviceIntSize, Vec) { let texture = self.gpu_cache_texture.texture.as_ref().unwrap(); - let size = FramebufferIntSize::from_untyped(texture.get_dimensions().to_untyped()); + let size = device_size_as_framebuffer_size(texture.get_dimensions()); let mut texels = vec![0; (size.width * size.height * 16) as usize]; self.device.begin_frame(); self.device.bind_read_target(ReadTarget::from_texture(texture, 0)); @@ -6858,7 +6858,7 @@ impl Renderer { // read from textures directly with `get_tex_image*`. for layer_id in 0 .. texture.get_layer_count() { - let rect = FramebufferIntSize::from_untyped(rect_size.to_untyped()).into(); + let rect = device_size_as_framebuffer_size(rect_size).into(); device.attach_read_texture(texture, layer_id); #[cfg(feature = "png")] diff --git a/webrender/src/screen_capture.rs b/webrender/src/screen_capture.rs index 7eaed714f0..5941f4e8c5 100644 --- a/webrender/src/screen_capture.rs +++ b/webrender/src/screen_capture.rs @@ -290,7 +290,7 @@ impl AsyncScreenshotGrabber { let draw_target_rect = draw_target .to_framebuffer_rect(DeviceIntRect::new(DeviceIntPoint::new(0, 0), dest_size)); - let read_target_rect = FramebufferIntRect::from_untyped(&read_target_rect.to_untyped()); + let read_target_rect = device_rect_as_framebuffer_rect(&read_target_rect); if level == 0 && !device.surface_origin_is_top_left() { device.blit_render_target_invert_y( diff --git a/webrender_api/src/units.rs b/webrender_api/src/units.rs index 00546acd70..1c4f602026 100644 --- a/webrender_api/src/units.rs +++ b/webrender_api/src/units.rs @@ -299,3 +299,25 @@ impl RectExt for Rect { self.max() } } + +// A few helpers to convert to cast between coordinate spaces that are often equivalent. + +#[inline] +pub fn layout_rect_as_picture_rect(layout_rect: &LayoutRect) -> PictureRect { + layout_rect.cast_unit() +} + +#[inline] +pub fn layout_vector_as_picture_vector(layout_vector: LayoutVector2D) -> PictureVector2D { + layout_vector.cast_unit() +} + +#[inline] +pub fn device_size_as_framebuffer_size(framebuffer_size: DeviceIntSize) -> FramebufferIntSize { + framebuffer_size.cast_unit() +} + +#[inline] +pub fn device_rect_as_framebuffer_rect(framebuffer_rect: &DeviceIntRect) -> FramebufferIntRect { + framebuffer_rect.cast_unit() +} From 604a99bef7d244d1c1ff70f70c5b0750c5525b67 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 31 Mar 2020 23:06:12 +0000 Subject: [PATCH 10/10] Bug 1625220 - Add autocfg to duplicate exceptions. r=gw num-traits depends on 1.0.0 while rand depends on version 0.1.2. Depends on D68470 Differential Revision: https://phabricator.services.mozilla.com/D68856 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/2e71e19f220563e1f1b51486ed618de03886edce --- servo-tidy.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/servo-tidy.toml b/servo-tidy.toml index b45489f8d5..42f61bdd26 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -6,6 +6,7 @@ check-alphabetical-order = false [ignore] # Ignored packages with duplicated versions packages = [ + "autocfg", "core-graphics", "core-text", "gl_generator",