[gnome-photos] gegl-gtk-view-helper: Add debug for time spent in blitting a node
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] gegl-gtk-view-helper: Add debug for time spent in blitting a node
- Date: Fri, 23 Jan 2015 11:59:56 +0000 (UTC)
commit 4214c4c06f7d7b716c93bb4e61aff3cd49a62642
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Jan 23 11:30:57 2015 +0100
gegl-gtk-view-helper: Add debug for time spent in blitting a node
src/gegl-gtk-view-helper.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gegl-gtk-view-helper.c b/src/gegl-gtk-view-helper.c
index a89a4ba..0552478 100644
--- a/src/gegl-gtk-view-helper.c
+++ b/src/gegl-gtk-view-helper.c
@@ -244,6 +244,8 @@ view_helper_draw(ViewHelper *self, cairo_t *cr, GdkRectangle *rect)
guchar *buf = NULL;
GeglRectangle roi;
gint stride;
+ gint64 end;
+ gint64 start;
roi.x = self->x + rect->x;
roi.y = self->y + rect->y;
@@ -253,6 +255,8 @@ view_helper_draw(ViewHelper *self, cairo_t *cr, GdkRectangle *rect)
stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, roi.width);
buf = g_malloc0(stride * roi.height);
+ start = g_get_monotonic_time ();
+
gegl_node_blit(self->node,
self->scale,
&roi,
@@ -261,6 +265,9 @@ view_helper_draw(ViewHelper *self, cairo_t *cr, GdkRectangle *rect)
GEGL_AUTO_ROWSTRIDE,
GEGL_BLIT_CACHE | (self->block ? 0 : GEGL_BLIT_DIRTY));
+ end = g_get_monotonic_time ();
+ g_debug ("Node Blit: %" G_GINT64_FORMAT, end - start);
+
surface = cairo_image_surface_create_for_data(buf,
CAIRO_FORMAT_ARGB32,
roi.width, roi.height,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]