[gnome-photos/wip/rishi/tests-gegl-simplify-conversion] test-gegl: Simplify code



commit a78c6833a3dcaac73729f692a97fde0d3a083c43
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Jan 5 13:52:51 2019 +0100

    test-gegl: Simplify code

 tests/unit/photos-test-gegl.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/tests/unit/photos-test-gegl.c b/tests/unit/photos-test-gegl.c
index 986a3bf4..10a53c0b 100644
--- a/tests/unit/photos-test-gegl.c
+++ b/tests/unit/photos-test-gegl.c
@@ -1,6 +1,6 @@
 /*
  * Photos - access, organize and share your photos on GNOME
- * Copyright © 2018 Red Hat, Inc.
+ * Copyright © 2018 – 2019 Red Hat, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -100,7 +100,6 @@ photos_test_gegl_setup (PhotosTestGeglFixture *fixture, const Babl *format, gdou
   GeglColor *path_stroke = NULL; /* TODO: use g_autoptr */
   GeglNode *buffer_sink;
   GeglNode *checkerboard;
-  GeglNode *convert_format;
   GeglNode *crop;
   GeglNode *over;
   GeglNode *path;
@@ -185,13 +184,15 @@ photos_test_gegl_setup (PhotosTestGeglFixture *fixture, const Babl *format, gdou
 
   over = gegl_node_new_child (graph, "operation", "svg:src-over", NULL);
 
-  convert_format = gegl_node_new_child (graph, "operation", "gegl:convert-format", "format", format, NULL);
-
-  buffer_sink = gegl_node_new_child (graph, "operation", "gegl:buffer-sink", "buffer", &buffer, NULL);
+  buffer_sink = gegl_node_new_child (graph,
+                                     "operation", "gegl:buffer-sink",
+                                     "buffer", &buffer,
+                                     "format", format,
+                                     NULL);
 
   gegl_node_link (path, translate);
   gegl_node_connect_to (translate, "output", over, "aux");
-  gegl_node_link_many (checkerboard, crop, over, convert_format, buffer_sink, NULL);
+  gegl_node_link_many (checkerboard, crop, over, buffer_sink, NULL);
   gegl_node_process (buffer_sink);
 
   fixture->buffer = g_object_ref (buffer);


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