wayland/buffer: Trace instrument buffer-attach

While browsing sysprof profiling reports, I saw surface-commit taking
significant times sometimes; trace attach too, to see whether such
things are due to e.g. texture uploads.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1616>
This commit is contained in:
Jonas Ådahl 2020-11-30 12:04:48 +01:00 committed by Marge Bot
parent d43c8cd842
commit c56433d6ee

View File

@ -530,6 +530,8 @@ meta_wayland_buffer_attach (MetaWaylandBuffer *buffer,
{
g_return_val_if_fail (buffer->resource, FALSE);
COGL_TRACE_BEGIN_SCOPED (MetaWaylandBufferAttach, "WaylandBuffer (attach)");
if (!meta_wayland_buffer_is_realized (buffer))
{
/* The buffer should have been realized at surface commit time */