[gnome-photos/wip/rishi/double-buffering: 4/12] Add a format parameter to photos_utils_get_buffer_from_node



commit 4752c83fc0e8d13d66cd409424a3dc62d09b6c1c
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Jan 17 06:14:37 2017 +0100

    Add a format parameter to photos_utils_get_buffer_from_node
    
    This is merely for the sake of completeness. The parameter is currently
    unused.

 src/photos-base-item.c |    6 +++---
 src/photos-utils.c     |    3 ++-
 src/photos-utils.h     |    2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 43c03e2..87f0048 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1110,7 +1110,7 @@ photos_base_item_guess_save_sizes_load (GObject *source_object, GAsyncResult *re
       goto out;
     }
 
-  buffer = photos_utils_get_buffer_from_node (graph);
+  buffer = photos_utils_get_buffer_from_node (graph, NULL);
   data = photos_base_item_save_data_new (NULL, buffer, priv->mime_type, 0.0);
   g_task_set_task_data (task, data, (GDestroyNotify) photos_base_item_save_data_free);
 
@@ -2052,7 +2052,7 @@ photos_base_item_save_to_stream_load (GObject *source_object, GAsyncResult *res,
       goto out;
     }
 
-  buffer = photos_utils_get_buffer_from_node (graph);
+  buffer = photos_utils_get_buffer_from_node (graph, NULL);
   photos_utils_buffer_zoom_async (buffer,
                                   data->zoom,
                                   cancellable,
@@ -3665,7 +3665,7 @@ photos_base_item_save_load (GObject *source_object, GAsyncResult *res, gpointer
       goto out;
     }
 
-  buffer = photos_utils_get_buffer_from_node (graph);
+  buffer = photos_utils_get_buffer_from_node (graph, NULL);
   photos_utils_buffer_zoom_async (buffer,
                                   data->zoom,
                                   cancellable,
diff --git a/src/photos-utils.c b/src/photos-utils.c
index dbee5cb..3f49db0 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -603,7 +603,7 @@ photos_utils_create_thumbnail (GFile *file,
 
 
 GeglBuffer *
-photos_utils_get_buffer_from_node (GeglNode *node)
+photos_utils_get_buffer_from_node (GeglNode *node, const Babl *format)
 {
   GeglBuffer *buffer = NULL;
   GeglNode *buffer_sink;
@@ -615,6 +615,7 @@ photos_utils_get_buffer_from_node (GeglNode *node)
   buffer_sink = gegl_node_new_child (graph,
                                      "operation", "gegl:buffer-sink",
                                      "buffer", &buffer,
+                                     "format", format,
                                      NULL);
   gegl_node_link (node, buffer_sink);
 
diff --git a/src/photos-utils.h b/src/photos-utils.h
index a9810f5..fcb88b8 100644
--- a/src/photos-utils.h
+++ b/src/photos-utils.h
@@ -98,7 +98,7 @@ gboolean         photos_utils_create_thumbnail            (GFile *file,
                                                            GCancellable *cancellable,
                                                            GError **error);
 
-GeglBuffer      *photos_utils_get_buffer_from_node        (GeglNode *node);
+GeglBuffer      *photos_utils_get_buffer_from_node        (GeglNode *node, const Babl *format);
 
 GIcon           *photos_utils_get_icon_from_cursor        (TrackerSparqlCursor *cursor);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]