diff --git a/gfx/wr/webrender/src/picture.rs b/gfx/wr/webrender/src/picture.rs index 8191047da9dd..735a8c636cdb 100644 --- a/gfx/wr/webrender/src/picture.rs +++ b/gfx/wr/webrender/src/picture.rs @@ -1964,10 +1964,6 @@ impl PictureCompositeMode { primitive.input.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect), FilterPrimitiveKind::ComponentTransfer(ref primitive) => primitive.input.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect), - FilterPrimitiveKind::Offset(ref primitive) => { - let input_rect = primitive.input.to_index(cur_index).map(|index| output_rects[index]).unwrap_or(picture_rect); - input_rect.translate(primitive.offset * Scale::new(1.0)) - }, FilterPrimitiveKind::Flood(..) => picture_rect, }; diff --git a/gfx/wr/webrender/src/prim_store/picture.rs b/gfx/wr/webrender/src/prim_store/picture.rs index 40f948b29570..d4b0d9295edd 100644 --- a/gfx/wr/webrender/src/prim_store/picture.rs +++ b/gfx/wr/webrender/src/prim_store/picture.rs @@ -31,7 +31,6 @@ pub enum FilterPrimitiveKey { ColorMatrix(ColorSpace, [Au; 20], FilterPrimitiveInput), DropShadow(ColorSpace, (VectorKey, Au, ColorU), FilterPrimitiveInput), ComponentTransfer(ColorSpace, FilterPrimitiveInput, Vec), - Offset(ColorSpace, FilterPrimitiveInput, VectorKey), } /// Represents a hashable description of how a picture primitive @@ -176,8 +175,6 @@ impl From> for PictureCompositeKey { } FilterPrimitiveKind::ComponentTransfer(component_transfer) => FilterPrimitiveKey::ComponentTransfer(primitive.color_space, component_transfer.input, filter_data.clone()), - FilterPrimitiveKind::Offset(info) => - FilterPrimitiveKey::Offset(primitive.color_space, info.input, info.offset.into()), } }).collect()) } diff --git a/gfx/wr/webrender/src/render_task.rs b/gfx/wr/webrender/src/render_task.rs index 6d0cede74cf9..4eab18a998ea 100644 --- a/gfx/wr/webrender/src/render_task.rs +++ b/gfx/wr/webrender/src/render_task.rs @@ -1467,26 +1467,6 @@ impl RenderTask { render_tasks.add(task) } } - FilterPrimitiveKind::Offset(ref info) => { - let input_task_id = get_task_input( - &info.input, - filter_primitives, - render_tasks, - cur_index, - &outputs, - original_task_id, - primitive.color_space - ); - - let offset = info.offset * LayoutToWorldScale::new(1.0) * device_pixel_scale; - let offset_task = RenderTask::new_svg_filter_primitive( - vec![input_task_id], - content_size, - uv_rect_kind, - SvgFilterInfo::Offset(offset), - ); - render_tasks.add(offset_task) - } }; outputs.push(render_task_id); } diff --git a/gfx/wr/webrender_api/src/display_item.rs b/gfx/wr/webrender_api/src/display_item.rs index cc1af20253b9..b0341bde84b5 100644 --- a/gfx/wr/webrender_api/src/display_item.rs +++ b/gfx/wr/webrender_api/src/display_item.rs @@ -837,13 +837,6 @@ pub struct IdentityPrimitive { pub input: FilterPrimitiveInput, } -#[repr(C)] -#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)] -pub struct OffsetPrimitive { - pub input: FilterPrimitiveInput, - pub offset: LayoutVector2D, -} - /// See: https://github.com/eqrion/cbindgen/issues/9 /// cbindgen:derive-eq=false #[repr(C)] @@ -859,7 +852,6 @@ pub enum FilterPrimitiveKind { ColorMatrix(ColorMatrixPrimitive), DropShadow(DropShadowPrimitive), ComponentTransfer(ComponentTransferPrimitive), - Offset(OffsetPrimitive), } impl Default for FilterPrimitiveKind { @@ -880,7 +872,6 @@ impl FilterPrimitiveKind { FilterPrimitiveKind::Identity(..) | FilterPrimitiveKind::Blend(..) | FilterPrimitiveKind::ColorMatrix(..) | - FilterPrimitiveKind::Offset(..) | // Component transfer's filter data is sanitized separately. FilterPrimitiveKind::ComponentTransfer(..) => {} } diff --git a/gfx/wr/wrench/reftests/filters/reftest.list b/gfx/wr/wrench/reftests/filters/reftest.list index ee1124a1667d..3852f77622a8 100644 --- a/gfx/wr/wrench/reftests/filters/reftest.list +++ b/gfx/wr/wrench/reftests/filters/reftest.list @@ -56,6 +56,5 @@ platform(linux,mac) == fuzzy(4,28250) svg-filter-drop-shadow-rotate.yaml svg-fil platform(linux,mac) == svg-filter-blur-transforms.yaml svg-filter-blur-transforms.png platform(linux,mac) == svg-filter-drop-shadow-on-viewport-edge.yaml svg-filter-drop-shadow-on-viewport-edge.png platform(linux,mac) == svg-filter-drop-shadow-perspective.yaml svg-filter-drop-shadow-perspective.png -== svg-filter-offset.yaml svg-filter-offset-ref.yaml == backdrop-filter-basic.yaml backdrop-filter-basic-ref.yaml platform(linux,mac) == backdrop-filter-perspective.yaml backdrop-filter-perspective.png diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-offset-ref.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-offset-ref.yaml deleted file mode 100644 index f6326b51347d..000000000000 --- a/gfx/wr/wrench/reftests/filters/svg-filter-offset-ref.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Tests the SVG offset filter primitive -# An offset filter should have the same effect as changing the origin of the rectangle. ---- -root: - items: - - type: stacking-context - bounds: 0 0 0 0 - items: - - type: rect - bounds: 20 20 100 100 - color: red diff --git a/gfx/wr/wrench/reftests/filters/svg-filter-offset.yaml b/gfx/wr/wrench/reftests/filters/svg-filter-offset.yaml deleted file mode 100644 index f48fb5104e4b..000000000000 --- a/gfx/wr/wrench/reftests/filters/svg-filter-offset.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Tests the SVG offset filter primitive -# An offset filter should have the same effect as changing the origin of the rectangle. ---- -root: - items: - - type: stacking-context - bounds: 0 0 0 0 - filter-primitives: - - type: offset - offset: 10 10 - in: original - items: - - type: rect - bounds: 10 10 100 100 - color: red diff --git a/gfx/wr/wrench/src/yaml_frame_writer.rs b/gfx/wr/wrench/src/yaml_frame_writer.rs index 5839a8f79775..2de2f5f85855 100644 --- a/gfx/wr/wrench/src/yaml_frame_writer.rs +++ b/gfx/wr/wrench/src/yaml_frame_writer.rs @@ -399,11 +399,6 @@ fn write_filter_primitives( yaml_node(&mut table, "type", Yaml::String("component-transfer".into())); filter_input_node(&mut table, "in", component_transfer_primitive.input); } - FilterPrimitiveKind::Offset(info) => { - yaml_node(&mut table, "type", Yaml::String("offset".into())); - filter_input_node(&mut table, "in", info.input); - vector_node(&mut table, "offset", &info.offset); - } } enum_node(&mut table, "color-space", filter_primitive.color_space); filter_primitives.push(Yaml::Hash(table)); diff --git a/gfx/wr/wrench/src/yaml_helper.rs b/gfx/wr/wrench/src/yaml_helper.rs index b4613207fa6b..bc005e63678b 100644 --- a/gfx/wr/wrench/src/yaml_helper.rs +++ b/gfx/wr/wrench/src/yaml_helper.rs @@ -769,12 +769,6 @@ impl YamlHelper for Yaml { input: self["in"].as_filter_input().unwrap(), }) } - "offset" => { - FilterPrimitiveKind::Offset(OffsetPrimitive { - input: self["in"].as_filter_input().unwrap(), - offset: self["offset"].as_vector().unwrap(), - }) - } _ => return None, };