[mutter/gbsneto/tracing: 26/33] clutter: Add some preliminary tracing to clutter
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/tracing: 26/33] clutter: Add some preliminary tracing to clutter
- Date: Fri, 24 May 2019 01:47:18 +0000 (UTC)
commit 71d390f43b38f86dd3473d765d8dc5319b5225b3
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue May 15 16:34:36 2018 +0100
clutter: Add some preliminary tracing to clutter
https://gitlab.gnome.org/GNOME/mutter/merge_requests/197
clutter/clutter/clutter-stage.c | 11 +++++++++++
clutter/clutter/cogl/clutter-stage-cogl.c | 6 ++++++
2 files changed, 17 insertions(+)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 9e267e9c9..14df24b4c 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -75,6 +75,7 @@
#include "clutter-private.h"
#include "cogl/cogl.h"
+#include "cogl/cogl-trace.h"
/* <private>
* ClutterStageHint:
@@ -632,6 +633,8 @@ clutter_stage_do_paint_view (ClutterStage *stage,
float viewport[4];
cairo_rectangle_int_t geom;
+ COGL_TRACE_BEGIN_SCOPED (ClutterStageDoPaintView);
+
_clutter_stage_window_get_geometry (priv->impl, &geom);
viewport[0] = priv->viewport[0];
@@ -685,10 +688,14 @@ _clutter_stage_paint_view (ClutterStage *stage,
{
ClutterStagePrivate *priv = stage->priv;
+ COGL_TRACE_BEGIN_SCOPED (ClutterStagePaintView);
+
if (!priv->impl)
return;
clutter_stage_do_paint_view (stage, view, clip);
+
+ COGL_TRACE_BEGIN_SCOPED (ClutterStagePaintViewAfterPaint);
g_signal_emit (stage, stage_signals[AFTER_PAINT], 0);
}
@@ -702,6 +709,8 @@ clutter_stage_paint (ClutterActor *self)
ClutterActorIter iter;
ClutterActor *child;
+ COGL_TRACE_BEGIN_SCOPED (ClutterStagePaint);
+
clutter_actor_iter_init (&iter, self);
while (clutter_actor_iter_next (&iter, &child))
clutter_actor_paint (child);
@@ -2945,6 +2954,8 @@ clutter_stage_read_pixels (ClutterStage *stage,
float pixel_height;
uint8_t *pixels;
+ COGL_TRACE_BEGIN_SCOPED (ClutterStageReadPixels);
+
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), NULL);
priv = stage->priv;
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 973272f9c..002ebe30c 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -46,6 +46,8 @@
#include "clutter-private.h"
#include "clutter-stage-private.h"
+#include "cogl/cogl-trace.h"
+
typedef struct _ClutterStageViewCoglPrivate
{
/*
@@ -958,6 +960,8 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
gboolean swap_event = FALSE;
GList *l;
+ COGL_TRACE_BEGIN (ClutterStageCoglRedraw);
+
for (l = _clutter_stage_window_get_views (stage_window); l; l = l->next)
{
ClutterStageView *view = l->data;
@@ -981,6 +985,8 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
stage_cogl->initialized_redraw_clip = FALSE;
stage_cogl->frame_count++;
+
+ COGL_TRACE_END (ClutterStageCoglRedraw);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]