Skip to content

wayland/buffer: use G_UNLIKELY for error paths

Niels De Graef requested to merge wip/nielsdg/sprinkle-some-g-likely into master

We do a lot of if-checks in MetaWaylandBuffer to deal with unexpected situations (as we should). However, that means we get a branching penalty for every time this leads to a misprediction. Although these should in theory be mitigated by a proper branch predictor, it doesn't hurt giving some hints to make sure that we don't sacrifice our hot path. Especially given that in the case of video streams, the meta_wayland_buffer_attach is called for example 60 times per second.

Merge request reports