Skip to content

scene-tree: Don't bother rendering all-black SPBs

David Turner requested to merge david.turner/wlroots:elide_black_spbs into master

In the scene-tree renderer, when deciding what to render, we already ignore opaque black rectangles at the very bottom (and anything under them) because we can assume we'll be rendering on a black background. Unfortunately wayland clients can't submit a black rectangle as-such, the closest they can do is submitting an opaque black-colored single-pixel-buffer (SPB) scaled up to the desired rect size/location. This patch tries to detect black opaque SPBs and handle them in the same way as black rects.

It only handles ARGB8888 buffers which support data access, but this will be the case for any SPBs made using the proper wayland SPB protocol.

Merge request reports

Loading