commit 9ad39971ec0f30b6bc20dccadc37174a53322ffa
parent 8d8f98199584e12513faa978f358c835b4a19522
Author: Sandor Molnar <smolnar@mozilla.com>
Date: Thu, 11 Dec 2025 05:55:58 +0200
Revert "Bug 2002563 - Add overlay's rounded clip rects handling to WebRender layer compositor r=gfx-reviewers,gw" for causing wrench failures
This reverts commit 0f038fc60815e52a0f45832777bee98027e708b9.
Diffstat:
3 files changed, 4 insertions(+), 43 deletions(-)
diff --git a/gfx/webrender_bindings/src/bindings.rs b/gfx/webrender_bindings/src/bindings.rs
@@ -1784,8 +1784,6 @@ impl LayerCompositor for WrLayerCompositor {
transform: CompositorSurfaceTransform,
clip_rect: DeviceIntRect,
image_rendering: ImageRendering,
- rounded_clip_rect: DeviceIntRect,
- rounded_clip_radii: ClipRadius,
) {
let layer = &self.visual_tree[index];
@@ -1796,8 +1794,8 @@ impl LayerCompositor for WrLayerCompositor {
&transform,
clip_rect,
image_rendering,
- rounded_clip_rect,
- rounded_clip_radii,
+ clip_rect,
+ ClipRadius::EMPTY,
);
}
}
diff --git a/gfx/wr/webrender/src/composite.rs b/gfx/wr/webrender/src/composite.rs
@@ -613,7 +613,6 @@ pub struct CompositorTransform {
#[cfg_attr(feature = "capture", derive(Serialize))]
#[cfg_attr(feature = "replay", derive(Deserialize))]
-#[derive(Debug)]
pub struct CompositorClip {
pub rect: DeviceRect,
pub radius: BorderRadius,
@@ -1610,8 +1609,6 @@ pub struct CompositorInputLayer {
pub usage: CompositorSurfaceUsage,
// If true, layer is opaque, blend can be disabled
pub is_opaque: bool,
- pub rounded_clip_rect: DeviceIntRect,
- pub rounded_clip_radii: ClipRadius,
}
// Provides the parameters about the frame to the compositor implementation.
@@ -1653,8 +1650,6 @@ pub trait LayerCompositor {
transform: CompositorSurfaceTransform,
clip_rect: DeviceIntRect,
image_rendering: ImageRendering,
- rounded_clip_rect: DeviceIntRect,
- rounded_clip_radii: ClipRadius,
);
// Finish compositing this frame - commit the visual tree to the OS
diff --git a/gfx/wr/webrender/src/renderer/mod.rs b/gfx/wr/webrender/src/renderer/mod.rs
@@ -3661,8 +3661,6 @@ impl Renderer {
is_opaque: false,
offset: DeviceIntPoint::zero(),
clip_rect: device_size.into(),
- rounded_clip_rect: device_size.into(),
- rounded_clip_radii: ClipRadius::EMPTY,
});
swapchain_layers.push(SwapChainLayer {
@@ -3800,14 +3798,12 @@ impl Renderer {
};
if let Some(new_layer_kind) = new_layer_kind {
- let (offset, clip_rect, is_opaque, rounded_clip_rect, rounded_clip_radii) = match usage {
+ let (offset, clip_rect, is_opaque) = match usage {
CompositorSurfaceUsage::Content => {
(
DeviceIntPoint::zero(),
device_size.into(),
false, // Assume not opaque, we'll calculate this later
- device_size.into(),
- ClipRadius::EMPTY,
)
}
CompositorSurfaceUsage::External { .. } => {
@@ -3828,29 +3824,7 @@ impl Renderer {
});
}
- let (rounded_clip_rect, rounded_clip_radii) = match tile.clip_index {
- Some(clip_index) => {
- let clip = composite_state.get_compositor_clip(clip_index);
- let radius = ClipRadius {
- top_left: clip.radius.top_left.width.round() as i32,
- top_right: clip.radius.top_right.width.round() as i32,
- bottom_left: clip.radius.bottom_left.width.round() as i32,
- bottom_right: clip.radius.bottom_right.width.round() as i32,
- };
- (clip.rect.to_i32(), radius)
- }
- None => {
- (clip_rect, ClipRadius::EMPTY)
- }
- };
-
- (
- rect.min.to_i32(),
- clip_rect,
- is_opaque,
- rounded_clip_rect,
- rounded_clip_radii,
- )
+ (rect.min.to_i32(), clip_rect, is_opaque)
}
CompositorSurfaceUsage::DebugOverlay => unreachable!(),
};
@@ -3860,8 +3834,6 @@ impl Renderer {
is_opaque,
offset,
clip_rect,
- rounded_clip_rect,
- rounded_clip_radii,
});
swapchain_layers.push(SwapChainLayer {
@@ -3929,8 +3901,6 @@ impl Renderer {
is_opaque: true,
offset: DeviceIntPoint::zero(),
clip_rect: device_size.into(),
- rounded_clip_rect: device_size.into(),
- rounded_clip_radii: ClipRadius::EMPTY,
});
swapchain_layers.push(SwapChainLayer {
@@ -4246,8 +4216,6 @@ impl Renderer {
transform,
layer.clip_rect,
ImageRendering::Auto,
- layer.rounded_clip_rect,
- layer.rounded_clip_radii,
);
}
}