#include "gdk/gdkgltextureprivate.h"
#include "gdk/gdkglcontextprivate.h"
+#include "gdk/gdkprofilerprivate.h"
#include <epoxy/gl.h>
#include <cairo-ft.h>
gsize buffer_size;
#ifdef G_ENABLE_DEBUG
GskProfiler *profiler;
- gint64 gpu_time, cpu_time;
+ gint64 gpu_time, cpu_time, start_time;
#endif
#ifdef G_ENABLE_DEBUG
#ifdef G_ENABLE_DEBUG
gsk_profiler_counter_inc (profiler, self->profile_counters.frames);
+ start_time = gsk_profiler_timer_get_start (profiler, self->profile_timers.cpu_time);
cpu_time = gsk_profiler_timer_end (profiler, self->profile_timers.cpu_time);
gsk_profiler_timer_set (profiler, self->profile_timers.cpu_time, cpu_time);
gsk_profiler_timer_set (profiler, self->profile_timers.gpu_time, gpu_time);
gsk_profiler_push_samples (profiler);
+
+ if (gdk_profiler_is_running ())
+ gdk_profiler_add_mark (start_time, cpu_time, "render", "");
+
#endif
}