https://www.apple.com/macos/big-sur-preview/ has bad performance with WebRender
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: jrmuizel, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug, )
Details
https://share.firefox.dev/3eqTGwy
Looks like we have a texture upload problem.
Reporter | ||
Comment 1•4 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #0)
https://share.firefox.dev/3eqTGwy
Looks like we have a texture upload problem.
Or generally stalling on the GPU.
Reporter | ||
Comment 2•4 years ago
|
||
It looks like we're spending most of our time in CS_Clip. I was able to reproduce it with a capture on my Mac.
Glenn, do you want to take a quick look to see what's going on?
Comment 3•4 years ago
|
||
I only see a large amount of CS_Clip time at one part of the page - when the main image is moving around during scrolling.
There is only a single clip, but there's two factors causing it to be particularly slow in this case:
- The clip is an image mask, which is quite large [1]. We should see why Gecko is creating an image mask in this case, in case it's something we can avoid.
- The clip mask has tiling enabled, which is unfortunately a very inefficient path in WR right now (as each tile is replayed over the entire clip mask area). This can be fixed / improved, it just hasn't been a priority as it's rare.
[1] clip_mask_image = ImageProperties { descriptor: ImageDescriptor { format: R8, size: 1356×777, stride: None, offset: 0, flags: (empty) }, external_image: None, tiling: Some(512), visible_rect: Rect(1356×777 at (0,0)) }
Reporter | ||
Comment 4•4 years ago
|
||
This is the mask: https://www.apple.com/v/macos/big-sur-preview/a/images/overview/experience/experience_hardware_mask__dcufdss65xoy_large.svg. Disabling it makes the clipping time go away.
Reporter | ||
Comment 5•4 years ago
|
||
This changes seems to help considerably:
diff --git a/gfx/webrender_bindings/src/bindings.rs b/gfx/webrender_bindings/src/bindings.rs
index 34fbde9f30cc1..5b8f2340617c2 100644
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1806,21 +1806,21 @@ pub extern "C" fn wr_resource_updates_add_blob_image(
visible_rect: DeviceIntRect,
) {
txn.add_blob_image(
image_key,
descriptor.into(),
Arc::new(bytes.flush_into_vec()),
visible_rect,
if descriptor.format == ImageFormat::BGRA8 {
Some(256)
} else {
- None
+ Some(4096)
},
);
}
#[no_mangle]
pub extern "C" fn wr_resource_updates_add_external_image(
txn: &mut Transaction,
image_key: WrImageKey,
descriptor: &WrImageDescriptor,
external_image_id: ExternalImageId,
Updated•4 years ago
|
Comment 6•4 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #4)
This is the mask: https://www.apple.com/v/macos/big-sur-preview/a/images/overview/experience/experience_hardware_mask__dcufdss65xoy_large.svg. Disabling it makes the clipping time go away.
It is set on the selector html.css-mask .section-experience .image-experience glass-hardware
, and applies to an element at .sticky-wrapper > .sticky-content > .hardware-wrapper > .image-experience > glass-hardware
. Unsetting the mask-image
and -webkit-mask-image
properties also eliminates the texture upload cost from the profile... at least sometimes, depending on the viewport size, it seems. So it seems we're uploading the rasterized mask many times.
Comment 7•4 years ago
|
||
uh why would this website issue block support for macOS 11?
Comment 8•4 years ago
|
||
I see an excessive amount of glyph rasterization happening every frame during scrolling. The text on the header is constantly re-rasterized even though it doesn't move.
Updated•4 years ago
|
Comment 9•4 years ago
|
||
The glyphs rasterization issue is fixed. This page is overall not too bad on linux. The main source of jank on linux is some webgl readback on the content side.
Comment 10•4 years ago
|
||
(In reply to Nicolas Silva [:nical] from comment #9)
some webgl readback on the content side.
That should be fixed when using the EGL backend (MOZ_X11_EGL=1
or MOZ_ENABLE_WAYLAND=1
) on mesa drivers.
Updated•4 months ago
|
Description
•