Skip to content

Make culling actually cull (it didn't before)

Daniel van Vugt requested to merge vanvugt/mutter:cull-content into master

meta_shaped_texture_paint_content was being called on all windows including those fully obscured and meant to be culled. It seems the culling test in meta_surface_actor_paint is ineffective because we don't actually use paint for painting. We use ClutterContent instead.

The difficulty with ClutterContent is that it gets painted before the actor's paint vfunc, and even before pre_paint. So to actually make culling work we need go up to the parent object (a MetaWindowActor) and enforce the culling there. So now meta_shaped_texture_paint_content is not called for culled windows.


Performance measurements on an i7-7700 at UHD 3840x2160:

Dragging a small terminal window over 8 maximized terminal windows:
Before: 30 FPS, 23 ms/frame
After: 60 FPS, 5 ms/frame

Maximized glxgears over 8 maximized terminal windows:
Before: 15 FPS, 50 ms/frame
After : 60 FPS, 6 ms/frame


Closes: #1295 (closed)

Also recommended: !1323 (merged)

Edited by Daniel van Vugt

Merge request reports