diff --git a/gfx/wr/webrender/res/prim_shared.glsl b/gfx/wr/webrender/res/prim_shared.glsl index 344c9d726ce8..1358f57c75fe 100644 --- a/gfx/wr/webrender/res/prim_shared.glsl +++ b/gfx/wr/webrender/res/prim_shared.glsl @@ -102,15 +102,11 @@ VertexInfo write_vertex(RectWithSize instance_rect, // Clamp to the two local clip rects. vec2 clamped_local_pos = clamp_rect(local_pos, local_clip_rect); - // Compute the visible rect to snap against. This ensures segments along the - // edges are snapped consistently with other nearby primitives. - RectWithSize visible_rect = intersect_rects(local_clip_rect, snap_rect); - /// Compute the snapping offset. vec2 snap_offset = compute_snap_offset( clamped_local_pos, transform.m, - visible_rect, + snap_rect, task.common_data.device_pixel_scale ); diff --git a/gfx/wr/webrender/src/prim_store/mod.rs b/gfx/wr/webrender/src/prim_store/mod.rs index 16e5d2384c6b..0cba12e4e33d 100644 --- a/gfx/wr/webrender/src/prim_store/mod.rs +++ b/gfx/wr/webrender/src/prim_store/mod.rs @@ -51,7 +51,7 @@ use std::sync::atomic::{AtomicUsize, Ordering}; use storage; use util::{ScaleOffset, MatrixHelpers, MaxRect, Recycler, TransformedRectKind}; use util::{pack_as_float, project_rect, raster_rect_to_device_pixels}; -use util::{scale_factors, clamp_to_scale_factor}; +use util::{scale_factors, clamp_to_scale_factor, RectHelpers}; use smallvec::SmallVec; pub mod borders; @@ -3535,9 +3535,9 @@ fn compute_snap_offset_impl( ) } -/// Retrieve the exact unsnapped device space rectangle for a primitive. -/// If the transform is axis-aligned, compute the snapping offsets that -/// the shaders will apply. +/// Retrieve the exact device space rectangle for a primitive, taking +/// into account the snapping that the shaders will apply if the transform +/// is axis-aligned. fn get_unclipped_device_rect( prim_spatial_node_index: SpatialNodeIndex, root_spatial_node_index: SpatialNodeIndex, @@ -3582,7 +3582,11 @@ fn get_unclipped_device_rect( bottom_right, }; - Some((unclipped_device_rect, snap_offsets)) + let p0 = unclipped_device_rect.origin + top_left; + let p1 = unclipped_device_rect.bottom_right() + bottom_right; + let unclipped = DeviceRect::from_floats(p0.x, p0.y, p1.x, p1.y); + + Some((unclipped, snap_offsets)) } TransformedRectKind::Complex => { Some((unclipped_device_rect, SnapOffsets::empty())) diff --git a/gfx/wr/wrench/reftests/border/reftest.list b/gfx/wr/wrench/reftests/border/reftest.list index 36c26509d1c1..b178e3b3dc7e 100644 --- a/gfx/wr/wrench/reftests/border/reftest.list +++ b/gfx/wr/wrench/reftests/border/reftest.list @@ -14,7 +14,7 @@ platform(linux,mac) == border-suite-3.yaml border-suite-3.png == border-double-simple-2.yaml border-double-simple-2-ref.yaml fuzzy(64,24) == border-groove-simple.yaml border-groove-simple-ref.yaml fuzzy(64,24) == border-ridge-simple.yaml border-ridge-simple-ref.yaml -platform(linux,mac) fuzzy(1,3) == degenerate-curve.yaml degenerate-curve.png +platform(linux,mac) fuzzy(1,2) == degenerate-curve.yaml degenerate-curve.png platform(linux,mac) == border-image.yaml border-image-ref.png == border-image-crash.yaml border-image-crash-ref.yaml == border-image-fill.yaml border-image-fill-ref.png diff --git a/gfx/wr/wrench/reftests/boxshadow/reftest.list b/gfx/wr/wrench/reftests/boxshadow/reftest.list index 5daaeee1df19..1a78e646d8fe 100644 --- a/gfx/wr/wrench/reftests/boxshadow/reftest.list +++ b/gfx/wr/wrench/reftests/boxshadow/reftest.list @@ -34,4 +34,4 @@ fuzzy(1,5) platform(linux,mac) == box-shadow-huge-radius.yaml box-shadow-huge-ra platform(linux,mac) == box-shadow-large-blur-radius-2.yaml box-shadow-large-blur-radius-2.png platform(linux,mac) == box-shadow-large-blur-radius-3.yaml box-shadow-large-blur-radius-3.png -platform(linux,mac) fuzzy(1,79) == scale.yaml scale.png +platform(linux,mac) == scale.yaml scale.png diff --git a/gfx/wr/wrench/reftests/transforms/reftest.list b/gfx/wr/wrench/reftests/transforms/reftest.list index 40e51e0159a7..29ab924ccecb 100644 --- a/gfx/wr/wrench/reftests/transforms/reftest.list +++ b/gfx/wr/wrench/reftests/transforms/reftest.list @@ -25,7 +25,7 @@ platform(linux,mac) == perspective-mask.yaml perspective-mask.png rotate-clip.yaml rotate-clip-ref.yaml clip-translate.yaml clip-translate-ref.yaml platform(linux,mac) == perspective-clip.yaml perspective-clip.png -platform(linux,mac) fuzzy(1,2) == perspective-clip-1.yaml perspective-clip-1.png +platform(linux,mac) == perspective-clip-1.yaml perspective-clip-1.png platform(linux,mac) fuzzy(1,2) == perspective-shadow.yaml perspective-shadow.png == complex-preserve-3d.yaml blank.yaml platform(linux,mac) fuzzy(9,348) == perspective-border-radius.yaml perspective-border-radius.png diff --git a/layout/reftests/border-image/reftest.list b/layout/reftests/border-image/reftest.list index 8884d1fc07ed..0b18a4290cab 100644 --- a/layout/reftests/border-image/reftest.list +++ b/layout/reftests/border-image/reftest.list @@ -48,14 +48,14 @@ fuzzy(0-1,0-149) fuzzy-if(OSX,0-1,0-10595) fuzzy-if(webrender,1-3,24999-25136) = fuzzy(0-1,0-433) fuzzy-if(skiaContent,0-1,0-2500) fuzzy-if(webrender,1-3,84138-85584) == border-image-linear-gradient-slice-fill-1.html border-image-linear-gradient-slice-fill-1-ref.html fuzzy(0-1,0-177) fuzzy-if(OSX,0-1,0-25771) fuzzy-if(skiaContent&&!Android,0-1,0-400) fuzzy-if(Android,0-1,0-6093) fuzzy-if(webrender,1-3,57249-57464) == border-image-linear-gradient-slice-fill-2.html border-image-linear-gradient-slice-fill-2-ref.html fuzzy(0-1,0-48) fuzzy-if(OSX,0-5,0-1676) fuzzy-if(webrender,1-1,4464-4537) == border-image-linear-gradient-width.html border-image-linear-gradient-width-ref.html -fuzzy(0-1,0-5000) fuzzy-if(OSX,0-1,0-15000) fuzzy-if(webrender,2-2,58629-58939) == border-image-linear-gradient-slice-width.html border-image-linear-gradient-slice-width-ref.html -fuzzy(0-1,0-3000) fuzzy-if(OSX,0-1,0-6000) fuzzy-if(webrender,1-3,25940-26413) == border-image-linear-gradient-outset.html border-image-linear-gradient-outset-ref.html +fuzzy(0-1,0-5000) fuzzy-if(OSX,0-1,0-15000) fuzzy-if(webrender,2-2,58629-58936) == border-image-linear-gradient-slice-width.html border-image-linear-gradient-slice-width-ref.html +fuzzy(0-1,0-3000) fuzzy-if(OSX,0-1,0-6000) fuzzy-if(webrender,1-3,26067-26413) == border-image-linear-gradient-outset.html border-image-linear-gradient-outset-ref.html fuzzy(0-1,0-12) fuzzy-if(skiaContent,0-1,0-400) fuzzy-if(webrender,1-3,26195-26872) == border-image-linear-gradient-repeat-repeat-1.html border-image-linear-gradient-repeat-repeat-1-ref.html fuzzy(0-1,0-13) fuzzy-if(skiaContent,0-1,0-300) fuzzy-if(webrender,1-3,26168-27131) == border-image-linear-gradient-repeat-round-1.html border-image-linear-gradient-repeat-round-1-ref.html fuzzy-if(webrender,1-3,64826-67805) == border-image-linear-gradient-repeat-repeat-2.html border-image-linear-gradient-repeat-repeat-2-ref.html fuzzy(0-1,0-576) fuzzy-if(skiaContent,0-1,0-2000) fuzzy-if(webrender,1-2,64575-68383) == border-image-linear-gradient-repeat-round-2.html border-image-linear-gradient-repeat-round-2-ref.html fuzzy(0-1,0-8533) fuzzy-if(webrender,1-3,84604-85925) == border-image-linear-gradient-repeat-repeat-3.html border-image-linear-gradient-repeat-repeat-3-ref.html -fuzzy(0-1,0-7161) fuzzy-if(webrender,1-3,85706-85864) == border-image-linear-gradient-repeat-round-3.html border-image-linear-gradient-repeat-round-3-ref.html +fuzzy(0-1,0-7161) fuzzy-if(webrender,2-3,92540-93290) == border-image-linear-gradient-repeat-round-3.html border-image-linear-gradient-repeat-round-3-ref.html fuzzy-if(webrender,0-1,0-2096) == border-image-radial-gradient.html border-image-radial-gradient-ref.html fuzzy(0-1,0-42) fuzzy-if(skiaContent,0-2,0-20) fuzzy-if(webrender,0-1,0-37818) == border-image-radial-gradient-slice-1.html border-image-radial-gradient-slice-1-ref.html diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 4fc80c2bc36e..a67cba565459 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -318,7 +318,7 @@ fuzzy-if(Android,0-3,0-50) fuzzy-if(skiaContent,0-1,0-133) == 273681-1.html 2736 == 283686-2.html 283686-2-ref.html == 283686-3.html about:blank == 289384-1.xhtml 289384-ref.xhtml -random-if(d2d) fuzzy-if(Android,0-8,0-1439) fuzzy-if(webrender,0-6,0-1124) HTTP == 289480.html#top 289480-ref.html # basically-verbatim acid2 test, HTTP for a 404 page -- bug 578114 for the d2d failures +fails-if(webrender&>kWidget) random-if(d2d) fuzzy-if(webrender&&cocoaWidget,1-2,400-900) fuzzy-if(Android,0-8,0-1439) HTTP == 289480.html#top 289480-ref.html # basically-verbatim acid2 test, HTTP for a 404 page -- bug 578114 for the d2d failures == 290129-1.html 290129-1-ref.html == 291078-1.html 291078-1-ref.html == 291078-2.html 291078-2-ref.html diff --git a/layout/reftests/css-gradients/reftest.list b/layout/reftests/css-gradients/reftest.list index 8a77d5147740..ba287c710f72 100644 --- a/layout/reftests/css-gradients/reftest.list +++ b/layout/reftests/css-gradients/reftest.list @@ -27,7 +27,7 @@ fuzzy-if(!contentSameGfxBackendAsCanvas,0-3,0-88500) fuzzy-if(azureSkiaGL||skiaC fuzzy-if(!contentSameGfxBackendAsCanvas,0-3,0-88500) fuzzy-if(azureSkiaGL||skiaContent,0-3,0-89700) == linear-vertical-1b.html linear-vertical-1-ref.html fuzzy-if(!contentSameGfxBackendAsCanvas,0-3,0-88500) fuzzy-if(azureSkiaGL||skiaContent,0-3,0-89700) == linear-vertical-1c.html linear-vertical-1-ref.html fuzzy-if(!contentSameGfxBackendAsCanvas,0-3,0-88500) fuzzy-if(azureSkiaGL||skiaContent,0-3,0-89700) == linear-vertical-1d.html linear-vertical-1-ref.html -fuzzy-if(webrender,0-3,0-21070) == linear-vertical-subpixel-1.html linear-vertical-subpixel-1-ref.html +fuzzy-if(webrender&&cocoaWidget,0-1,0-98) == linear-vertical-subpixel-1.html linear-vertical-subpixel-1-ref.html == linear-viewport.html linear-viewport-ref.html == nostops.html about:blank == onestop.html about:blank diff --git a/layout/reftests/w3c-css/submitted/images3/reftest.list b/layout/reftests/w3c-css/submitted/images3/reftest.list index 7d963efa9f25..5abac4f3b5fa 100644 --- a/layout/reftests/w3c-css/submitted/images3/reftest.list +++ b/layout/reftests/w3c-css/submitted/images3/reftest.list @@ -185,9 +185,9 @@ fails-if(!webrender) random-if(webrender) == object-position-svg-001e.html objec == object-position-svg-001i.html object-position-svg-001-ref.html fails-if(!webrender) random-if(webrender) == object-position-svg-001o.html object-position-svg-001-ref.html # bug 1103286 == object-position-svg-001p.html object-position-svg-001-ref.html -fails == object-position-svg-002e.html object-position-svg-002-ref.html # bug 1103286 +fails-if(!webrender) == object-position-svg-002e.html object-position-svg-002-ref.html # bug 1103286 == object-position-svg-002i.html object-position-svg-002-ref.html -fails == object-position-svg-002o.html object-position-svg-002-ref.html # bug 1103286 +fails-if(!webrender) == object-position-svg-002o.html object-position-svg-002-ref.html # bug 1103286 == object-position-svg-002p.html object-position-svg-002-ref.html # Tests for gradient color stops with 'currentcolor' diff --git a/widget/reftests/reftest.list b/widget/reftests/reftest.list index 82453272d4f6..1ae13800af72 100644 --- a/widget/reftests/reftest.list +++ b/widget/reftests/reftest.list @@ -1,5 +1,5 @@ == progressbar-fallback-default-style.html progressbar-fallback-default-style-ref.html -fuzzy-if(Android,0-17,0-1120) fuzzy-if(webrender,0-8,0-480) == meter-native-style.html meter-native-style-ref.html +fuzzy-if(Android,0-17,0-1120) fuzzy-if(webrender&&winWidget,0-1,0-5) == meter-native-style.html meter-native-style-ref.html skip-if(!cocoaWidget) == meter-vertical-native-style.html meter-vertical-native-style-ref.html # dithering == meter-fallback-default-style.html meter-fallback-default-style-ref.html load 664925.xhtml