cogl/framebuffer: Add trace spans to flush and finish

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3417>
This commit is contained in:
Ivan Molodetskikh 2023-11-09 10:06:25 +04:00 committed by Marge Bot
parent 03252fefa3
commit c897302f87

View File

@ -49,6 +49,7 @@
#include "cogl/cogl1-context.h"
#include "cogl/cogl-private.h"
#include "cogl/cogl-primitives-private.h"
#include "cogl/cogl-trace.h"
#include "cogl/winsys/cogl-winsys-private.h"
enum
@ -1688,6 +1689,8 @@ cogl_framebuffer_finish (CoglFramebuffer *framebuffer)
CoglFramebufferPrivate *priv =
cogl_framebuffer_get_instance_private (framebuffer);
COGL_TRACE_BEGIN_SCOPED (Finish, "Cogl::Framebuffer::finish()");
_cogl_framebuffer_flush_journal (framebuffer);
cogl_framebuffer_driver_finish (priv->driver);
@ -1699,6 +1702,8 @@ cogl_framebuffer_flush (CoglFramebuffer *framebuffer)
CoglFramebufferPrivate *priv =
cogl_framebuffer_get_instance_private (framebuffer);
COGL_TRACE_BEGIN_SCOPED (Flush, "Cogl::Framebuffer::flush()");
_cogl_framebuffer_flush_journal (framebuffer);
cogl_framebuffer_driver_flush (priv->driver);