forked from AuroraMiddleware/gtk
profiler: Clean up profiler marks for frameclock
This drops the marks for before/after-paint as they are internal things that very rarely use any time, and also flush/resume-events as any events reported here will get separate marks so will be easy to see anyway. Also, we rename the entire frameclock cycle to "frameclock cycle" rather than "paint_idle" which is rather cryptic.
This commit is contained in:
parent
e3a67385f4
commit
324202a56c
@ -647,23 +647,13 @@ gdk_frame_clock_get_refresh_info (GdkFrameClock *frame_clock,
|
||||
void
|
||||
_gdk_frame_clock_emit_flush_events (GdkFrameClock *frame_clock)
|
||||
{
|
||||
gint64 before = g_get_monotonic_time ();
|
||||
|
||||
g_signal_emit (frame_clock, signals[FLUSH_EVENTS], 0);
|
||||
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
gdk_profiler_end_mark (before, "frameclock", "flush-events");
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_frame_clock_emit_before_paint (GdkFrameClock *frame_clock)
|
||||
{
|
||||
gint64 before = g_get_monotonic_time ();
|
||||
|
||||
g_signal_emit (frame_clock, signals[BEFORE_PAINT], 0);
|
||||
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
gdk_profiler_end_mark (before, "frameclock", "before-paint");
|
||||
}
|
||||
|
||||
void
|
||||
@ -702,23 +692,13 @@ _gdk_frame_clock_emit_paint (GdkFrameClock *frame_clock)
|
||||
void
|
||||
_gdk_frame_clock_emit_after_paint (GdkFrameClock *frame_clock)
|
||||
{
|
||||
gint64 before = g_get_monotonic_time ();
|
||||
|
||||
g_signal_emit (frame_clock, signals[AFTER_PAINT], 0);
|
||||
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
gdk_profiler_end_mark (before, "frameclock", "after-paint");
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_frame_clock_emit_resume_events (GdkFrameClock *frame_clock)
|
||||
{
|
||||
gint64 before = g_get_monotonic_time ();
|
||||
|
||||
g_signal_emit (frame_clock, signals[RESUME_EVENTS], 0);
|
||||
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
gdk_profiler_end_mark (before, "frameclock", "resume-events");
|
||||
}
|
||||
|
||||
static gint64
|
||||
|
@ -502,7 +502,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
priv->sleep_serial = get_sleep_serial ();
|
||||
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
gdk_profiler_end_mark (before, "frameclock", "paint_idle");
|
||||
gdk_profiler_end_mark (before, "frameclock cycle", NULL);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -599,7 +599,7 @@ gdk_frame_clock_idle_thaw (GdkFrameClock *clock)
|
||||
if (priv->freeze_time != 0)
|
||||
{
|
||||
gdk_profiler_end_mark (priv->freeze_time,
|
||||
"frameclock freeze", NULL);
|
||||
"frameclock frozen", NULL);
|
||||
priv->freeze_time = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user