[mutter/gbsneto/tracing: 64/68] 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: 64/68] clutter: Add some preliminary tracing to clutter
- Date: Wed, 12 Sep 2018 11:54:22 +0000 (UTC)
commit 688623af8ec4b7ee34597cc41cb5fd65cad91f95
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue May 15 16:34:36 2018 +0100
clutter: Add some preliminary tracing to clutter
clutter/clutter/clutter-stage.c | 11 +++++++++++
clutter/clutter/cogl/clutter-stage-cogl.c | 6 ++++++
clutter/configure.ac | 7 ++++---
3 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 9352f49e8..425955b56 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -78,6 +78,7 @@
#include "clutter-private.h"
#include "cogl/cogl.h"
+#include "cogl/cogl-trace.h"
/* <private>
* ClutterStageHint:
@@ -626,6 +627,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];
@@ -679,10 +682,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);
}
@@ -696,6 +703,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);
@@ -2936,6 +2945,8 @@ clutter_stage_read_pixels (ClutterStage *stage,
CoglFramebuffer *framebuffer;
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 84da1b19f..cab648aae 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -49,6 +49,8 @@
#include "clutter-private.h"
#include "clutter-stage-private.h"
+#include "cogl/cogl-trace.h"
+
typedef struct _ClutterStageViewCoglPrivate
{
/*
@@ -860,6 +862,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;
@@ -883,6 +887,8 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
stage_cogl->initialized_redraw_clip = FALSE;
stage_cogl->frame_count++;
+
+ COGL_TRACE_END (ClutterStageCoglRedraw);
}
static void
diff --git a/clutter/configure.ac b/clutter/configure.ac
index 5b4112442..e866bc395 100644
--- a/clutter/configure.ac
+++ b/clutter/configure.ac
@@ -164,9 +164,10 @@ AC_ARG_ENABLE([Bsymbolic],
])
AC_ARG_ENABLE(tracing,
- AC_HELP_STRING([--disable-tracing],
- [disable performance tracin]),,
- enable_tracing=yes)
+ AC_HELP_STRING([--disable-tracing],
+ [disable performance tracing]),
+ [],
+ enable_tracing=yes)
if test x$enable_tracing = xyes; then
AC_DEFINE(HAVE_TRACING,1,[Enable tracing])
CLUTTER_TRACING_PC_FILES="sysprof-capture-2"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]