WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
264966
[GTK] Slow CSS animations and dropped frames when animating `transition-property: transform, filter;` on `filter: opacity` with more than 2 large images
https://bugs.webkit.org/show_bug.cgi?id=264966
Summary
[GTK] Slow CSS animations and dropped frames when animating `transition-prope...
Jeff Fortin
Reported
2023-11-16 10:51:52 PST
Created
attachment 468621
[details]
sysprof capture Visiting
https://www.kepstin.ca/dump/loupe-crossfade-demo/
(or specifically
https://www.kepstin.ca/dump/loupe-crossfade-demo/stacked.html
if the parent link stops working) with Epiphany 45.0 on Fedora 39 with the Wayland GNOME session, you can see that the slide animations stop working after the second image because they are so slow that they have to drop frames. This is dependent on the amount of images on that page. The problem does not occur with Firefox on the same machines. Attaching a sysprof capture that I recorded with my laptop with Intel Kabylake graphics. It seems related to cairo and pixman.
Attachments
sysprof capture
(4.26 MB, application/x-xz)
2023-11-16 10:51 PST
,
Jeff Fortin
no flags
Details
sysprof screenshot - flame chart
(277.04 KB, image/png)
2023-11-16 10:53 PST
,
Jeff Fortin
no flags
Details
sysprof screenshot - callgraph, part 1
(288.06 KB, image/png)
2023-11-16 10:53 PST
,
Jeff Fortin
no flags
Details
sysprof screenshot - callgraph, part 2
(249.26 KB, image/png)
2023-11-16 10:53 PST
,
Jeff Fortin
no flags
Details
sysprof screenshot - graphics/compositing marks
(311.37 KB, image/png)
2023-11-16 10:54 PST
,
Jeff Fortin
no flags
Details
sysprof screenshot - flame chart
(318.35 KB, image/png)
2023-11-16 11:00 PST
,
Jeff Fortin
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jeff Fortin
Comment 1
2023-11-16 10:53:04 PST
Created
attachment 468622
[details]
sysprof screenshot - flame chart
Jeff Fortin
Comment 2
2023-11-16 10:53:43 PST
Created
attachment 468623
[details]
sysprof screenshot - callgraph, part 1
Jeff Fortin
Comment 3
2023-11-16 10:53:57 PST
Created
attachment 468624
[details]
sysprof screenshot - callgraph, part 2
Jeff Fortin
Comment 4
2023-11-16 10:54:18 PST
Created
attachment 468625
[details]
sysprof screenshot - graphics/compositing marks
Jeff Fortin
Comment 5
2023-11-16 11:00:49 PST
Created
attachment 468626
[details]
sysprof screenshot - flame chart This one actually includes the top of the chart, whereas the previous one was hidden by scrolling
Calvin Walton
Comment 6
2023-11-16 11:38:12 PST
Hi, I'm the author of the affected page. I figured out the particular thing that was causing the performance issue - I was using a CSS transition with `transition-property: transform, filter;` set, and then transitioning from `filter: opacity(0%);` to `filter: opacity(100%);` and vice-versa. It looks like the opacity filter is hitting a very slow software fallback. When I changed the page to transition the `opacity` property rather than use a filter, performance improved substantially. The current version of the links posted earlier reflect this updated. The original version of the page which exhibits this issue has a permanent link here:
https://www.kepstin.ca/dump/loupe-crossfade-demo/stacked-webkitgtk-filter.html
Carlos Garcia Campos
Comment 7
2023-11-17 01:38:57 PST
The problem is the interpolation quality, we render the images with the default interpolation quality, that uses CAIRO_FILTER_GOOD, giving high quality results but it's very slow when downscaling high resolution images. There's code in WebKit to use low interpolation quality when there's a resize animation or the view is being resized, but doesn't handle this case of CSS transition filter animation. When using the opacity property, the image is rendered once using default interpolation quality and then the effect is done by the GPU, that's why it works better.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug