[gnome-photos/wip/rishi/faster-previews: 2/3] base-item: Simplify code
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/faster-previews: 2/3] base-item: Simplify code
- Date: Wed, 25 Jan 2017 17:03:57 +0000 (UTC)
commit 1b98af916b688a9d3f5e0e9a384a27816a148ca8
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jan 25 16:59:26 2017 +0100
base-item: Simplify code
src/photos-base-item.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index bd1a64b..3ca3d70 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -2569,7 +2569,6 @@ photos_base_item_create_preview (PhotosBaseItem *self,
GeglNode *graph = NULL;
GeglNode *operation_node;
GeglOperation *op;
- GeglProcessor *processor = NULL;
GeglRectangle bbox;
GeglRectangle roi;
cairo_surface_t *surface = NULL;
@@ -2627,11 +2626,10 @@ photos_base_item_create_preview (PhotosBaseItem *self,
va_end (ap);
gegl_node_link_many (buffer_source, operation_node, NULL);
- processor = gegl_node_new_processor (operation_node, NULL);
start = g_get_monotonic_time ();
- while (gegl_processor_work (processor, NULL));
+ gegl_node_process (operation_node);
end = g_get_monotonic_time ();
photos_debug (PHOTOS_DEBUG_GEGL, "Create Preview: Process: %" G_GINT64_FORMAT, end - start);
@@ -2660,7 +2658,6 @@ photos_base_item_create_preview (PhotosBaseItem *self,
g_object_unref (buffer_cropped);
g_object_unref (buffer_orig);
g_object_unref (graph);
- g_object_unref (processor);
return surface;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]