diff --git a/gfx/tests/reftest/reftest.list b/gfx/tests/reftest/reftest.list index fd5c2ce0fa5c..e8d129321fb1 100644 --- a/gfx/tests/reftest/reftest.list +++ b/gfx/tests/reftest/reftest.list @@ -14,7 +14,7 @@ fuzzy(0-100,0-30) == 1149923.html 1149923-ref.html # use fuzzy due to few distor == 1444904.html 1444904-ref.html == 1451168.html 1451168-ref.html == 1461313.html 1461313-ref.html -fuzzy(5-32,21908-26621) fuzzy-if(webrender,0-9,0-100) == 1463802.html 1463802-ref.html +fuzzy(5-32,21908-26621) fuzzy-if(webrender,0-1,0-3) == 1463802.html 1463802-ref.html fuzzy(0-11,0-4) == 1474722.html 1474722-ref.html == 1501195.html 1501195-ref.html == 1519754.html 1519754-ref.html diff --git a/gfx/wr/webrender/res/clip_shared.glsl b/gfx/wr/webrender/res/clip_shared.glsl index 023256aef084..3f3abb349246 100644 --- a/gfx/wr/webrender/res/clip_shared.glsl +++ b/gfx/wr/webrender/res/clip_shared.glsl @@ -14,7 +14,6 @@ in ivec4 aClipDataResourceAddress; in vec2 aClipLocalPos; in vec4 aClipTileRect; in vec4 aClipDeviceArea; -in vec4 aClipSnapOffsets; struct ClipMaskInstance { int render_task_address; @@ -25,7 +24,6 @@ struct ClipMaskInstance { vec2 local_pos; RectWithSize tile_rect; RectWithSize sub_rect; - vec4 snap_offsets; }; ClipMaskInstance fetch_clip_item() { @@ -39,7 +37,6 @@ ClipMaskInstance fetch_clip_item() { cmi.local_pos = aClipLocalPos; cmi.tile_rect = RectWithSize(aClipTileRect.xy, aClipTileRect.zw); cmi.sub_rect = RectWithSize(aClipDeviceArea.xy, aClipDeviceArea.zw); - cmi.snap_offsets = aClipSnapOffsets; return cmi; } @@ -60,21 +57,26 @@ ClipVertexInfo write_clip_tile_vertex(RectWithSize local_clip_rect, Transform prim_transform, Transform clip_transform, ClipArea area, - RectWithSize sub_rect, - vec4 snap_offsets) { + RectWithSize sub_rect) { vec2 device_pos = area.screen_origin + sub_rect.p0 + aPosition.xy * sub_rect.size; - // If the primitive we are drawing a clip mask for was snapped, then - // remove the effect of that snapping, so that the local position - // interpolation below works correctly relative to the clip item. - vec2 snap_offset = mix( - snap_offsets.xy, - snap_offsets.zw, - aPosition.xy - ); + if (clip_transform.is_axis_aligned && prim_transform.is_axis_aligned) { + mat4 snap_mat = clip_transform.m * prim_transform.inv_m; + vec4 snap_positions = compute_snap_positions( + snap_mat, + local_clip_rect, + area.common_data.device_pixel_scale + ); - device_pos -= snap_offset; + vec2 snap_offsets = compute_snap_offset_impl( + device_pos, + RectWithSize(snap_positions.xy, snap_positions.zw - snap_positions.xy), + snap_positions + ); + + device_pos -= snap_offsets; + } vec2 world_pos = device_pos / area.common_data.device_pixel_scale; diff --git a/gfx/wr/webrender/res/cs_clip_box_shadow.glsl b/gfx/wr/webrender/res/cs_clip_box_shadow.glsl index 02a8ba4a7515..c90989cffc30 100644 --- a/gfx/wr/webrender/res/cs_clip_box_shadow.glsl +++ b/gfx/wr/webrender/res/cs_clip_box_shadow.glsl @@ -54,8 +54,7 @@ void main(void) { prim_transform, clip_transform, area, - cmi.sub_rect, - cmi.snap_offsets + cmi.sub_rect ); vLocalPos = vi.local_pos; vLayer = res.layer; diff --git a/gfx/wr/webrender/res/cs_clip_image.glsl b/gfx/wr/webrender/res/cs_clip_image.glsl index 1a1fa13c87f5..8f790b08b6c6 100644 --- a/gfx/wr/webrender/res/cs_clip_image.glsl +++ b/gfx/wr/webrender/res/cs_clip_image.glsl @@ -36,8 +36,7 @@ void main(void) { prim_transform, clip_transform, area, - cmi.sub_rect, - cmi.snap_offsets + cmi.sub_rect ); vLocalPos = vi.local_pos.xy / vi.local_pos.z; vLayer = res.layer; diff --git a/gfx/wr/webrender/res/cs_clip_rectangle.glsl b/gfx/wr/webrender/res/cs_clip_rectangle.glsl index 639d116fbc88..e7d424280f03 100644 --- a/gfx/wr/webrender/res/cs_clip_rectangle.glsl +++ b/gfx/wr/webrender/res/cs_clip_rectangle.glsl @@ -72,8 +72,7 @@ void main(void) { prim_transform, clip_transform, area, - cmi.sub_rect, - cmi.snap_offsets + cmi.sub_rect ); vLocalPos = vi.local_pos; diff --git a/gfx/wr/webrender/res/snap.glsl b/gfx/wr/webrender/res/snap.glsl index 36029f2ef9ba..b5da8ba2705e 100644 --- a/gfx/wr/webrender/res/snap.glsl +++ b/gfx/wr/webrender/res/snap.glsl @@ -26,9 +26,6 @@ vec4 compute_snap_positions( return world_snap; } -/// Given a point within a local rectangle, and the device space corners -/// of a snapped primitive, return the snap offsets. This *must* exactly -/// match the logic in the GLSL compute_snap_offset_impl function. vec2 compute_snap_offset_impl( vec2 reference_pos, RectWithSize reference_rect, diff --git a/gfx/wr/webrender/src/batch.rs b/gfx/wr/webrender/src/batch.rs index 2d455e26b9f6..2d2c9da7e46c 100644 --- a/gfx/wr/webrender/src/batch.rs +++ b/gfx/wr/webrender/src/batch.rs @@ -10,7 +10,7 @@ use clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex use glyph_rasterizer::GlyphFormat; use gpu_cache::{GpuCache, GpuCacheHandle, GpuCacheAddress}; use gpu_types::{BrushFlags, BrushInstance, PrimitiveHeaders, ZBufferId, ZBufferIdGenerator}; -use gpu_types::{ClipMaskInstance, SplitCompositeInstance, SnapOffsets}; +use gpu_types::{ClipMaskInstance, SplitCompositeInstance}; use gpu_types::{PrimitiveInstanceData, RasterizationSpace, GlyphInstance}; use gpu_types::{PrimitiveHeader, PrimitiveHeaderIndex, TransformPaletteId, TransformPalette}; use internal_types::{FastHashMap, SavedTargetIndex, TextureSource}; @@ -2566,7 +2566,6 @@ impl ClipBatcher { local_pos, tile_rect: LayoutRect::zero(), sub_rect, - snap_offsets: SnapOffsets::empty(), }; self.rectangles.push(instance); @@ -2675,7 +2674,6 @@ impl ClipBatcher { actual_rect: DeviceIntRect, world_rect: &WorldRect, device_pixel_scale: DevicePixelScale, - snap_offsets: SnapOffsets, ) { for i in 0 .. clip_node_range.count { let clip_instance = clip_store.get_instance_from_range(&clip_node_range, i); @@ -2705,7 +2703,6 @@ impl ClipBatcher { DevicePoint::zero(), actual_rect.size.to_f32(), ), - snap_offsets, }; match clip_node.item { diff --git a/gfx/wr/webrender/src/gpu_types.rs b/gfx/wr/webrender/src/gpu_types.rs index e5b91d2be734..3a5cd4c4ebea 100644 --- a/gfx/wr/webrender/src/gpu_types.rs +++ b/gfx/wr/webrender/src/gpu_types.rs @@ -6,7 +6,7 @@ use api::{ DeviceHomogeneousVector, DevicePoint, DeviceSize, DeviceRect, LayoutRect, LayoutToWorldTransform, LayoutTransform, PremultipliedColorF, LayoutToPictureTransform, PictureToLayoutTransform, PicturePixel, - WorldPixel, WorldToLayoutTransform, LayoutPoint, DeviceVector2D + WorldPixel, WorldToLayoutTransform, LayoutPoint, }; use clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex}; use gpu_cache::{GpuCacheAddress, GpuDataRequest}; @@ -143,7 +143,6 @@ pub struct ClipMaskInstance { pub local_pos: LayoutPoint, pub tile_rect: LayoutRect, pub sub_rect: DeviceRect, - pub snap_offsets: SnapOffsets, } /// A border corner dot or dash drawn into the clipping mask. @@ -574,28 +573,6 @@ pub enum UvRectKind { }, } -/// Represents offsets in device pixels that a primitive -/// was snapped to. -#[cfg_attr(feature = "capture", derive(Serialize))] -#[cfg_attr(feature = "replay", derive(Deserialize))] -#[derive(Copy, Clone, Debug)] -#[repr(C)] -pub struct SnapOffsets { - /// How far the top left corner was snapped - pub top_left: DeviceVector2D, - /// How far the bottom right corner was snapped - pub bottom_right: DeviceVector2D, -} - -impl SnapOffsets { - pub fn empty() -> Self { - SnapOffsets { - top_left: DeviceVector2D::zero(), - bottom_right: DeviceVector2D::zero(), - } - } -} - #[derive(Debug, Copy, Clone)] #[cfg_attr(feature = "capture", derive(Serialize))] #[cfg_attr(feature = "replay", derive(Deserialize))] diff --git a/gfx/wr/webrender/src/prim_store/mod.rs b/gfx/wr/webrender/src/prim_store/mod.rs index 69ddb0536d2d..85893aac6ec8 100644 --- a/gfx/wr/webrender/src/prim_store/mod.rs +++ b/gfx/wr/webrender/src/prim_store/mod.rs @@ -5,8 +5,8 @@ use api::{BorderRadius, ClipMode, ColorF, PictureRect, ColorU, LayoutVector2D}; use api::{DeviceIntRect, DevicePixelScale, DeviceRect, WorldVector2D}; use api::{FilterOp, ImageRendering, TileOffset, RepeatMode, WorldPoint, WorldSize}; -use api::{LayoutPoint, LayoutRect, LayoutSideOffsets, LayoutSize, PicturePoint}; -use api::{PremultipliedColorF, PropertyBinding, Shadow, DeviceVector2D}; +use api::{LayoutPoint, LayoutRect, LayoutSideOffsets, LayoutSize}; +use api::{PremultipliedColorF, PropertyBinding, Shadow}; use api::{WorldPixel, BoxShadowClipMode, WorldRect, LayoutToWorldScale}; use api::{PicturePixel, RasterPixel, LineStyle, LineOrientation, AuHelpers}; use api::{LayoutPrimitiveInfo}; @@ -24,7 +24,7 @@ use frame_builder::{FrameBuildingContext, FrameBuildingState, PictureContext, Pi use frame_builder::{PrimitiveContext, FrameVisibilityContext, FrameVisibilityState}; use glyph_rasterizer::GlyphKey; use gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle, GpuDataRequest, ToGpuBlocks}; -use gpu_types::{BrushFlags, SnapOffsets}; +use gpu_types::BrushFlags; use image::{Repetition}; use intern; use malloc_size_of::MallocSizeOf; @@ -49,9 +49,9 @@ use std::{cmp, fmt, hash, ops, u32, usize, mem}; #[cfg(debug_assertions)] use std::sync::atomic::{AtomicUsize, Ordering}; use storage; -use util::{ScaleOffset, MatrixHelpers, MaxRect, Recycler, TransformedRectKind}; +use util::{ScaleOffset, MatrixHelpers, MaxRect, Recycler}; use util::{pack_as_float, project_rect, raster_rect_to_device_pixels}; -use util::{scale_factors, clamp_to_scale_factor, RectHelpers}; +use util::{scale_factors, clamp_to_scale_factor}; use smallvec::SmallVec; pub mod borders; @@ -972,8 +972,6 @@ impl BrushSegment { frame_context: &FrameBuildingContext, frame_state: &mut FrameBuildingState, clip_data_store: &mut ClipDataStore, - unclipped: &DeviceRect, - prim_snap_offsets: SnapOffsets, ) -> ClipMaskKind { match clip_chain { Some(clip_chain) => { @@ -982,12 +980,9 @@ impl BrushSegment { return ClipMaskKind::None; } - // Get a minimal device space rect, clipped to the screen that we - // need to allocate for the clip mask, as well as interpolated - // snap offsets. - let (device_rect, snap_offsets) = match get_clipped_device_rect( - unclipped, - prim_snap_offsets, + let (device_rect, _) = match get_raster_rects( + clip_chain.pic_clip_rect, + &pic_state.map_pic_to_raster, &pic_state.map_raster_to_world, prim_bounding_rect, frame_context.device_pixel_scale, @@ -1007,7 +1002,6 @@ impl BrushSegment { frame_state.resource_cache, frame_state.render_tasks, clip_data_store, - snap_offsets, ); let clip_task_id = frame_state.render_tasks.add(clip_task); @@ -3197,8 +3191,6 @@ impl PrimitiveInstance { segments_store: &mut SegmentStorage, segment_instances_store: &mut SegmentInstanceStorage, clip_mask_instances: &mut Vec, - unclipped: &DeviceRect, - prim_snap_offsets: SnapOffsets, ) -> bool { let segments = match self.kind { PrimitiveInstanceKind::Picture { .. } | @@ -3295,8 +3287,6 @@ impl PrimitiveInstance { frame_context, frame_state, &mut data_stores.clip, - unclipped, - prim_snap_offsets, ); clip_mask_instances.push(clip_mask_kind); } else { @@ -3337,8 +3327,6 @@ impl PrimitiveInstance { frame_context, frame_state, &mut data_stores.clip, - unclipped, - prim_snap_offsets, ); clip_mask_instances.push(clip_mask_kind); } @@ -3365,21 +3353,6 @@ impl PrimitiveInstance { println!("\tupdating clip task with pic rect {:?}", prim_info.clip_chain.pic_clip_rect); } - // Get the device space rect for the primitive if it was unclipped, - // including any snap offsets applied to the corners. - let (unclipped, prim_snap_offsets) = match get_unclipped_device_rect( - prim_context.spatial_node_index, - root_spatial_node_index, - prim_info.clip_chain.pic_clip_rect, - &pic_state.map_pic_to_raster, - frame_context.device_pixel_scale, - frame_context, - frame_state, - ) { - Some(info) => info, - None => return, - }; - self.build_segments_if_needed( &prim_info.clip_chain, frame_state, @@ -3403,8 +3376,6 @@ impl PrimitiveInstance { &mut scratch.segments, &mut scratch.segment_instances, &mut scratch.clip_mask_instances, - &unclipped, - prim_snap_offsets, ) { if self.is_chased() { println!("\tsegment tasks have been created for clipping"); @@ -3413,12 +3384,9 @@ impl PrimitiveInstance { } if prim_info.clip_chain.needs_mask { - // Get a minimal device space rect, clipped to the screen that we - // need to allocate for the clip mask, as well as interpolated - // snap offsets. - if let Some((device_rect, snap_offsets)) = get_clipped_device_rect( - &unclipped, - prim_snap_offsets, + if let Some((device_rect, _)) = get_raster_rects( + prim_info.clip_chain.pic_clip_rect, + &pic_state.map_pic_to_raster, &pic_state.map_raster_to_world, prim_info.clipped_world_rect, frame_context.device_pixel_scale, @@ -3432,7 +3400,6 @@ impl PrimitiveInstance { frame_state.resource_cache, frame_state.render_tasks, &mut data_stores.clip, - snap_offsets, ); let clip_task_id = frame_state.render_tasks.add(clip_task); @@ -3450,160 +3417,6 @@ impl PrimitiveInstance { } } -/// Mimics the GLSL mix() function. -fn mix(x: f32, y: f32, a: f32) -> f32 { - x * (1.0 - a) + y * a -} - -/// Given a point within a local rectangle, and the device space corners -/// of a snapped primitive, return the snap offsets. This *must* exactly -/// match the logic in the GLSL compute_snap_offset_impl function. -fn compute_snap_offset_impl( - reference_pos: PicturePoint, - reference_rect: PictureRect, - prim_top_left: DevicePoint, - prim_bottom_right: DevicePoint, -) -> DeviceVector2D { - let normalized_snap_pos = PicturePoint::new( - (reference_pos.x - reference_rect.origin.x) / reference_rect.size.width, - (reference_pos.y - reference_rect.origin.y) / reference_rect.size.height, - ); - - let top_left = DeviceVector2D::new( - (prim_top_left.x + 0.5).floor() - prim_top_left.x, - (prim_top_left.y + 0.5).floor() - prim_top_left.y, - ); - - let bottom_right = DeviceVector2D::new( - (prim_bottom_right.x + 0.5).floor() - prim_bottom_right.x, - (prim_bottom_right.y + 0.5).floor() - prim_bottom_right.y, - ); - - DeviceVector2D::new( - mix(top_left.x, bottom_right.x, normalized_snap_pos.x), - mix(top_left.y, bottom_right.y, normalized_snap_pos.y), - ) -} - -/// 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, - prim_rect: PictureRect, - map_to_raster: &SpaceMapper, - device_pixel_scale: DevicePixelScale, - frame_context: &FrameBuildingContext, - frame_state: &mut FrameBuildingState, -) -> Option<(DeviceRect, SnapOffsets)> { - let unclipped_raster_rect = map_to_raster.map(&prim_rect)?; - - let unclipped_device_rect = { - let world_rect = unclipped_raster_rect * TypedScale::new(1.0); - let device_rect = world_rect * device_pixel_scale; - device_rect - }; - - let transform_id = frame_state.transforms.get_id( - prim_spatial_node_index, - root_spatial_node_index, - frame_context.clip_scroll_tree, - ); - - match transform_id.transform_kind() { - TransformedRectKind::AxisAligned => { - let top_left = compute_snap_offset_impl( - prim_rect.origin, - prim_rect, - unclipped_device_rect.origin, - unclipped_device_rect.bottom_right(), - ); - - let bottom_right = compute_snap_offset_impl( - prim_rect.bottom_right(), - prim_rect, - unclipped_device_rect.origin, - unclipped_device_rect.bottom_right(), - ); - - let snap_offsets = SnapOffsets { - top_left, - bottom_right, - }; - - 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())) - } - } -} - -/// Given an unclipped device rect, try to find a minimal device space -/// rect to allocate a clip mask for, by clipping to the screen. This -/// function is very similar to get_raster_rects below. It is far from -/// ideal, and should be refactored as part of the support for setting -/// scale per-raster-root. -fn get_clipped_device_rect( - unclipped: &DeviceRect, - prim_snap_offsets: SnapOffsets, - map_to_world: &SpaceMapper, - prim_bounding_rect: WorldRect, - device_pixel_scale: DevicePixelScale, -) -> Option<(DeviceIntRect, SnapOffsets)> { - let unclipped_raster_rect = { - let world_rect = *unclipped * TypedScale::new(1.0); - let raster_rect = world_rect * device_pixel_scale.inv(); - TypedRect::from_untyped(&raster_rect.to_untyped()) - }; - - let unclipped_world_rect = map_to_world.map(&unclipped_raster_rect)?; - - let clipped_world_rect = unclipped_world_rect.intersection(&prim_bounding_rect)?; - - let clipped_raster_rect = map_to_world.unmap(&clipped_world_rect)?; - - let clipped_raster_rect = clipped_raster_rect.intersection(&unclipped_raster_rect)?; - - // Ensure that we won't try to allocate a zero-sized clip render task. - if clipped_raster_rect.is_empty() { - return None; - } - - let clipped = raster_rect_to_device_pixels( - clipped_raster_rect, - device_pixel_scale, - ); - - let fx0 = (clipped.origin.x - unclipped.origin.x) / unclipped.size.width; - let fy0 = (clipped.origin.y - unclipped.origin.y) / unclipped.size.height; - - let fx1 = (clipped.origin.x + clipped.size.width - unclipped.origin.x) / unclipped.size.width; - let fy1 = (clipped.origin.y + clipped.size.height - unclipped.origin.y) / unclipped.size.height; - - let top_left = DeviceVector2D::new( - mix(prim_snap_offsets.top_left.x, prim_snap_offsets.bottom_right.x, fx0), - mix(prim_snap_offsets.top_left.y, prim_snap_offsets.bottom_right.y, fy0), - ); - - let bottom_right = DeviceVector2D::new( - mix(prim_snap_offsets.top_left.x, prim_snap_offsets.bottom_right.x, fx1), - mix(prim_snap_offsets.top_left.y, prim_snap_offsets.bottom_right.y, fy1), - ); - - let snap_offsets = SnapOffsets { - top_left, - bottom_right, - }; - - Some((clipped.to_i32(), snap_offsets)) -} - pub fn get_raster_rects( pic_rect: PictureRect, map_to_raster: &SpaceMapper, diff --git a/gfx/wr/webrender/src/render_task.rs b/gfx/wr/webrender/src/render_task.rs index b8b1942c085d..74334aed4224 100644 --- a/gfx/wr/webrender/src/render_task.rs +++ b/gfx/wr/webrender/src/render_task.rs @@ -17,7 +17,7 @@ use euclid::{TypedPoint2D, TypedVector2D}; use freelist::{FreeList, FreeListHandle, WeakFreeListHandle}; use glyph_rasterizer::GpuGlyphCacheKey; use gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle}; -use gpu_types::{BorderInstance, ImageSource, UvRectKind, SnapOffsets}; +use gpu_types::{BorderInstance, ImageSource, UvRectKind}; use internal_types::{CacheTextureId, FastHashMap, LayerIndex, SavedTargetIndex}; #[cfg(feature = "pathfinder")] use pathfinder_partitioner::mesh::Mesh; @@ -239,7 +239,6 @@ pub struct CacheMaskTask { pub actual_rect: DeviceIntRect, pub root_spatial_node_index: SpatialNodeIndex, pub clip_node_range: ClipNodeRange, - pub snap_offsets: SnapOffsets, } #[derive(Debug)] @@ -534,7 +533,6 @@ impl RenderTask { resource_cache: &mut ResourceCache, render_tasks: &mut RenderTaskTree, clip_data_store: &mut ClipDataStore, - snap_offsets: SnapOffsets, ) -> Self { // Step through the clip sources that make up this mask. If we find // any box-shadow clip sources, request that image from the render @@ -604,7 +602,6 @@ impl RenderTask { actual_rect: outer_rect, clip_node_range, root_spatial_node_index, - snap_offsets, }), ClearMode::One, ) diff --git a/gfx/wr/webrender/src/renderer.rs b/gfx/wr/webrender/src/renderer.rs index 28250b47fc0e..423428b8245e 100644 --- a/gfx/wr/webrender/src/renderer.rs +++ b/gfx/wr/webrender/src/renderer.rs @@ -540,11 +540,6 @@ pub(crate) mod desc { name: "aClipDeviceArea", count: 4, kind: VertexAttributeKind::F32, - }, - VertexAttribute { - name: "aClipSnapOffsets", - count: 4, - kind: VertexAttributeKind::F32, } ], }; diff --git a/gfx/wr/webrender/src/tiling.rs b/gfx/wr/webrender/src/tiling.rs index 48acd708f83a..64939b95d11f 100644 --- a/gfx/wr/webrender/src/tiling.rs +++ b/gfx/wr/webrender/src/tiling.rs @@ -656,7 +656,6 @@ impl RenderTarget for AlphaRenderTarget { task_info.actual_rect, &ctx.screen_world_rect, ctx.device_pixel_scale, - task_info.snap_offsets, ); } RenderTaskKind::ClipRegion(ref region_task) => { diff --git a/gfx/wr/wrench/reftests/border/degenerate-curve.png b/gfx/wr/wrench/reftests/border/degenerate-curve.png index 0d7013e8de07..f6f20525c943 100644 Binary files a/gfx/wr/wrench/reftests/border/degenerate-curve.png and b/gfx/wr/wrench/reftests/border/degenerate-curve.png differ diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.png index ade1cfa9769d..65adb6f8faf6 100644 Binary files a/gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.png and b/gfx/wr/wrench/reftests/boxshadow/box-shadow-huge-radius.png differ diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.png index 23705e8aabd4..c7953f8288fd 100644 Binary files a/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.png and b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-2.png differ diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.png index bd388a4af3a9..db6400c8a73b 100644 Binary files a/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.png and b/gfx/wr/wrench/reftests/boxshadow/box-shadow-large-blur-radius-3.png differ diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.png index 389e4e3eed73..24d0ba0ee6f0 100644 Binary files a/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.png and b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-x.png differ diff --git a/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.png b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.png index d8828eebb772..07b5e65546a8 100644 Binary files a/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.png and b/gfx/wr/wrench/reftests/boxshadow/box-shadow-stretch-mode-y.png differ diff --git a/gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only-ref.png b/gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only-ref.png index 6b7e98413e87..31315a1ddf69 100644 Binary files a/gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only-ref.png and b/gfx/wr/wrench/reftests/boxshadow/boxshadow-spread-only-ref.png differ diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-mask-region.png b/gfx/wr/wrench/reftests/boxshadow/inset-mask-region.png index 8c356ac3e0fd..f923400d2533 100644 Binary files a/gfx/wr/wrench/reftests/boxshadow/inset-mask-region.png and b/gfx/wr/wrench/reftests/boxshadow/inset-mask-region.png differ diff --git a/gfx/wr/wrench/reftests/boxshadow/inset-subpx.png b/gfx/wr/wrench/reftests/boxshadow/inset-subpx.png index 0d5f2c368987..edcbb1652ab2 100644 Binary files a/gfx/wr/wrench/reftests/boxshadow/inset-subpx.png and b/gfx/wr/wrench/reftests/boxshadow/inset-subpx.png differ diff --git a/gfx/wr/wrench/reftests/boxshadow/reftest.list b/gfx/wr/wrench/reftests/boxshadow/reftest.list index 1a78e646d8fe..6de1a7f7bb18 100644 --- a/gfx/wr/wrench/reftests/boxshadow/reftest.list +++ b/gfx/wr/wrench/reftests/boxshadow/reftest.list @@ -3,7 +3,7 @@ == inset-no-blur-radius.yaml inset-no-blur-radius-ref.png == inset-spread-large.yaml inset-spread-large-ref.yaml platform(linux,mac) == inset-alpha.yaml inset-alpha.png -platform(linux,mac) == boxshadow-spread-only.yaml boxshadow-spread-only-ref.png +== boxshadow-spread-only.yaml boxshadow-spread-only-ref.png == box-shadow-clip.yaml box-shadow-clip-ref.yaml fuzzy(1,396) == inset-large-offset.yaml inset-large-offset-ref.png platform(linux,mac) == inset-border-radius.yaml inset-border-radius.png @@ -30,8 +30,7 @@ platform(linux,mac) fuzzy(1,41) == box-shadow-stretch-mode-y.yaml box-shadow-str platform(linux,mac) fuzzy(1,14) == inset-mask-region.yaml inset-mask-region.png == box-shadow-blurred-overlapping-radii.yaml box-shadow-blurred-overlapping-radii-ref.yaml -fuzzy(1,5) platform(linux,mac) == box-shadow-huge-radius.yaml box-shadow-huge-radius.png +platform(linux,mac) == box-shadow-huge-radius.yaml box-shadow-huge-radius.png 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) == scale.yaml scale.png diff --git a/gfx/wr/wrench/reftests/boxshadow/scale.png b/gfx/wr/wrench/reftests/boxshadow/scale.png deleted file mode 100644 index 5853a15d7ceb..000000000000 Binary files a/gfx/wr/wrench/reftests/boxshadow/scale.png and /dev/null differ diff --git a/gfx/wr/wrench/reftests/boxshadow/scale.yaml b/gfx/wr/wrench/reftests/boxshadow/scale.yaml deleted file mode 100644 index 12263b4eb91e..000000000000 --- a/gfx/wr/wrench/reftests/boxshadow/scale.yaml +++ /dev/null @@ -1,183 +0,0 @@ -# Test that box shadows are drawn with correct symmetry in -# a variety of cases. This test checks for various scale -# factors, in combination with box shadows clipped by the -# screen rect. It also has come large box shadows that check -# the symmetry still works with segmentation enabled. ---- -root: - items: - - type: stacking-context - transform: scale(0.3) - items: - - type: box-shadow - bounds: [ -70, 50, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.4) - items: - - type: box-shadow - bounds: [ -70, 150, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.5) - items: - - type: box-shadow - bounds: [ -70, 250, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.6) - items: - - type: box-shadow - bounds: [ -70, 350, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.7) - items: - - type: box-shadow - bounds: [ -70, 450, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.73) - items: - - type: box-shadow - bounds: [ -70, 550, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.75) - items: - - type: box-shadow - bounds: [ -70, 650, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.77) - items: - - type: box-shadow - bounds: [ -70, 750, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.8) - items: - - type: box-shadow - bounds: [ -70, 850, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - items: - - type: box-shadow - bounds: [ -70, 800, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - - type: stacking-context - transform: scale(0.3) - items: - - type: box-shadow - bounds: [ 50, 50, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.4) - items: - - type: box-shadow - bounds: [ 50, 150, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.5) - items: - - type: box-shadow - bounds: [ 50, 250, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.6) - items: - - type: box-shadow - bounds: [ 50, 350, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.7) - items: - - type: box-shadow - bounds: [ 50, 450, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.73) - items: - - type: box-shadow - bounds: [ 50, 550, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.75) - items: - - type: box-shadow - bounds: [ 50, 650, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.77) - items: - - type: box-shadow - bounds: [ 50, 750, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - transform: scale(0.8) - items: - - type: box-shadow - bounds: [ 50, 850, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - type: stacking-context - items: - - type: box-shadow - bounds: [ 50, 800, 100, 100 ] - color: black - blur-radius: 1 - clip-mode: inset - - - type: stacking-context - items: - - type: box-shadow - bounds: [ 200, -100, 600, 200 ] - color: black - blur-radius: 5 - clip-mode: inset - - - type: stacking-context - items: - - type: box-shadow - bounds: [ 200, 200, 600, 200 ] - color: black - blur-radius: 5 - clip-mode: outset diff --git a/gfx/wr/wrench/reftests/clip/clip-45-degree-rotation-ref.png b/gfx/wr/wrench/reftests/clip/clip-45-degree-rotation-ref.png index 2e5b3fcc953b..d554807aff20 100644 Binary files a/gfx/wr/wrench/reftests/clip/clip-45-degree-rotation-ref.png and b/gfx/wr/wrench/reftests/clip/clip-45-degree-rotation-ref.png differ diff --git a/gfx/wr/wrench/reftests/clip/reftest.list b/gfx/wr/wrench/reftests/clip/reftest.list index 9ecfa1a36c55..a37afd2a7ec1 100644 --- a/gfx/wr/wrench/reftests/clip/reftest.list +++ b/gfx/wr/wrench/reftests/clip/reftest.list @@ -7,7 +7,7 @@ fuzzy(1,3) == clip-corner-overlap.yaml clip-corner-overlap-ref.yaml == custom-clip-chains.yaml custom-clip-chains-ref.yaml == custom-clip-chain-node-ancestors.yaml custom-clip-chain-node-ancestors-ref.yaml == fixed-position-clipping.yaml fixed-position-clipping-ref.yaml -platform(linux,mac) == segmentation-with-other-coordinate-system-clip.yaml segmentation-with-other-coordinate-system-clip.png +== segmentation-with-other-coordinate-system-clip.yaml segmentation-with-other-coordinate-system-clip-ref.yaml == segmentation-across-rotation.yaml segmentation-across-rotation-ref.yaml == color_targets(3) alpha_targets(1) stacking-context-clip.yaml stacking-context-clip-ref.yaml == snapping.yaml snapping-ref.yaml diff --git a/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.png b/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.png deleted file mode 100644 index eb63662bcb0f..000000000000 Binary files a/gfx/wr/wrench/reftests/clip/segmentation-with-other-coordinate-system-clip.png and /dev/null differ diff --git a/gfx/wr/wrench/reftests/snap/preserve-3d.png b/gfx/wr/wrench/reftests/snap/preserve-3d.png index 7335af347454..2fd522da4de6 100644 Binary files a/gfx/wr/wrench/reftests/snap/preserve-3d.png and b/gfx/wr/wrench/reftests/snap/preserve-3d.png differ diff --git a/gfx/wr/wrench/reftests/transforms/perspective-clip-1.png b/gfx/wr/wrench/reftests/transforms/perspective-clip-1.png index 4a8464b71634..e0845e106f6c 100644 Binary files a/gfx/wr/wrench/reftests/transforms/perspective-clip-1.png and b/gfx/wr/wrench/reftests/transforms/perspective-clip-1.png differ diff --git a/layout/reftests/border-radius/reftest.list b/layout/reftests/border-radius/reftest.list index 1b926e99d227..1c54d29ab600 100644 --- a/layout/reftests/border-radius/reftest.list +++ b/layout/reftests/border-radius/reftest.list @@ -43,7 +43,7 @@ fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-1,0-1) fuzzy-if(skiaConten # Tests for clipping the contents of replaced elements and overflow!=visible != clipping-4-ref.html clipping-4-notref.html -fuzzy-if(true,0-1,0-20) fuzzy-if(d2d,0-72,0-196) fuzzy-if(cocoaWidget,0-1,0-180) fuzzy-if(Android,0-140,0-237) == clipping-4-canvas.html clipping-4-ref.html # bug 732535 +fuzzy-if(true,0-1,0-20) fuzzy-if(d2d,0-72,0-196) fuzzy-if(cocoaWidget,0-1,0-180) fuzzy-if(Android,0-140,0-237) fuzzy-if(webrender&&cocoaWidget,8-8,1-1) == clipping-4-canvas.html clipping-4-ref.html # bug 732535 fuzzy-if(Android,0-5,0-54) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-37,0-157) fuzzy-if(skiaContent,0-1,0-172) == clipping-4-image.html clipping-4-ref.html fuzzy-if(skiaContent,0-1,0-77) == clipping-4-overflow-hidden.html clipping-4-ref.html == clipping-5-canvas.html clipping-5-refc.html diff --git a/layout/reftests/box-shadow/reftest.list b/layout/reftests/box-shadow/reftest.list index cad4f27a7726..df47a414a45f 100644 --- a/layout/reftests/box-shadow/reftest.list +++ b/layout/reftests/box-shadow/reftest.list @@ -11,7 +11,7 @@ random != boxshadow-blur-2.html boxshadow-blur-2-notref.html # fixedpoint divisi == boxshadow-rounding.html boxshadow-rounding-ref.html # One uses old path, one uses WR box shadow. fails-if(Android) == boxshadow-button.html boxshadow-button-ref.html -fuzzy-if(OSX==1010,0-1,0-24) fuzzy-if(d2d,0-16,0-999) fuzzy-if(skiaContent,0-1,0-12) fuzzy-if(webrender,5-9,700-1080) == boxshadow-large-border-radius.html boxshadow-large-border-radius-ref.html # Bug 1209649 +fuzzy-if(OSX==1010,0-1,0-24) fuzzy-if(d2d,0-16,0-999) fuzzy-if(skiaContent,0-1,0-12) fuzzy-if(webrender,5-9,700-850) == boxshadow-large-border-radius.html boxshadow-large-border-radius-ref.html # Bug 1209649 fails-if(Android) == boxshadow-fileupload.html boxshadow-fileupload-ref.html fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-98,0-152) fuzzy-if(skiaContent,0-13,0-28) fuzzy-if(webrender,19-19,49-52) == boxshadow-inner-basic.html boxshadow-inner-basic-ref.svg diff --git a/layout/reftests/css-break/reftest.list b/layout/reftests/css-break/reftest.list index 62a9b2e25adb..9eccc4f97814 100644 --- a/layout/reftests/css-break/reftest.list +++ b/layout/reftests/css-break/reftest.list @@ -1,5 +1,5 @@ == box-decoration-break-1.html box-decoration-break-1-ref.html -fuzzy(0-1,0-20) fuzzy-if(skiaContent,0-1,0-700) fuzzy-if(webrender,20-26,8908-12681) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html +fuzzy(0-1,0-20) fuzzy-if(skiaContent,0-1,0-700) fuzzy-if(webrender,21-26,8908-12681) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html skip-if(verify) fuzzy(0-45,0-460) fuzzy-if(skiaContent,0-57,0-439) fuzzy-if(Android,0-57,0-1330) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html # Bug 1386543, bug 1392106 random-if(!gtkWidget) == box-decoration-break-border-image.html box-decoration-break-border-image-ref.html == box-decoration-break-block-border-padding.html box-decoration-break-block-border-padding-ref.html diff --git a/layout/reftests/transform-3d/reftest.list b/layout/reftests/transform-3d/reftest.list index 2a44e7097ce4..9cca89c11659 100644 --- a/layout/reftests/transform-3d/reftest.list +++ b/layout/reftests/transform-3d/reftest.list @@ -60,7 +60,7 @@ fuzzy-if((gtkWidget&&layersOMTC)||(winWidget&&!layersGPUAccelerated),0-1,0-86) = == transform-style-flat-1a.html transform-style-flat-1-ref.html == willchange-containing-block.html?willchange willchange-containing-block.html?ref != willchange-containing-block.html?willchange willchange-containing-block.html?noblock -fuzzy-if(winWidget&&!layersGPUAccelerated,0-1,0-606) fuzzy-if(webrender,0-3,0-304) == scroll-perspective-1.html scroll-perspective-1-ref.html +fuzzy-if(winWidget&&!layersGPUAccelerated,0-1,0-606) == scroll-perspective-1.html scroll-perspective-1-ref.html # Bugs fails-if(!layersGPUAccelerated) fuzzy-if(webrender,0-23,0-826) == 1035611-1.html 1035611-1-ref.html # Bug 1072898 for !layersGPUAccelerated failures != 1157984-1.html about:blank # Bug 1157984 @@ -82,7 +82,7 @@ fuzzy(0-1,0-10000) == opacity-preserve3d-4.html opacity-preserve3d-4-ref.html == opacity-preserve3d-5.html opacity-preserve3d-5-ref.html == snap-perspective-1.html snap-perspective-1-ref.html == mask-layer-1.html mask-layer-ref.html -== mask-layer-2.html mask-layer-ref.html +fuzzy-if(webrender&>kWidget,8-8,100-100) == mask-layer-2.html mask-layer-ref.html fuzzy-if(webrender,0-16,0-100) == mask-layer-3.html mask-layer-ref.html == split-intersect1.html split-intersect1-ref.html fuzzy(0-255,0-150) == split-intersect2.html split-intersect2-ref.html