[gegl] operations: rename gegl:invert to gegl:invert-linear



commit 7147ac0c3f351fddc00962ab250e41a20094c21f
Author: Michael Henning <drawoc darkrefraction com>
Date:   Sun Jun 23 12:50:16 2013 -0400

    operations: rename gegl:invert to gegl:invert-linear

 bindings/rgegl/samples/xml-parsing.rb           |    2 +-
 examples/csugar.c                               |    2 +-
 opencl/{invert.cl => invert-linear.cl}          |    4 ++--
 opencl/{invert.cl.h => invert-linear.cl.h}      |    6 +++---
 operations/common/high-pass.c                   |    2 +-
 operations/common/{invert.c => invert-linear.c} |   12 ++++++------
 po/POTFILES.in                                  |    2 +-
 tests/compositions/clones.xml                   |    2 +-
 tests/opencl/Makefile.am                        |    2 +-
 tests/opencl/{invert.xml => invert-linear.xml}  |    2 +-
 tests/python/test-gegl-node.py                  |    4 ++--
 tests/xml/test-load.c                           |    8 ++++----
 tests/xml/test-save.c                           |    8 ++++----
 13 files changed, 28 insertions(+), 28 deletions(-)
---
diff --git a/bindings/rgegl/samples/xml-parsing.rb b/bindings/rgegl/samples/xml-parsing.rb
index b7328d2..4e4345b 100755
--- a/bindings/rgegl/samples/xml-parsing.rb
+++ b/bindings/rgegl/samples/xml-parsing.rb
@@ -16,7 +16,7 @@ gegl=Gegl.parse_xml(
      <gegl:gaussian-blur std_dev_y='0' name='blur'/>
      <gegl:text string='GEGL' name='text' size='60' color='rgb(0.0,0.0,0.0)'/>
    </gegl:over>
-   <gegl:invert/>
+   <gegl:invert-linear/>
    <gegl:brightness-contrast contrast='0.4' brightness='-0.3'/>
    <gegl:gaussian-blur />
    <gegl:fractal-explorer xmin='0.2' ymin='0' xmax='0.5' ymax='0.45'
diff --git a/examples/csugar.c b/examples/csugar.c
index 21b00f1..def7d0a 100644
--- a/examples/csugar.c
+++ b/examples/csugar.c
@@ -26,7 +26,7 @@ main (gint argc,
                  "x", 0.4,
                  "y", 0.4,
                  NULL,
-      gegl_node ("gegl:invert",
+      gegl_node ("gegl:invert-linear",
                  NULL,
       gegl_node ("gegl:load",
                  "path", argv[1],
diff --git a/opencl/invert.cl b/opencl/invert-linear.cl
similarity index 54%
rename from opencl/invert.cl
rename to opencl/invert-linear.cl
index 33fdb48..f6fe968 100644
--- a/opencl/invert.cl
+++ b/opencl/invert-linear.cl
@@ -1,5 +1,5 @@
-__kernel void gegl_invert (__global const float4     *in,
-                           __global       float4     *out)
+__kernel void gegl_invert_linear (__global const float4     *in,
+                                  __global       float4     *out)
 {
   int gid = get_global_id(0);
   float4 in_v  = in[gid];
diff --git a/opencl/invert.cl.h b/opencl/invert-linear.cl.h
similarity index 75%
rename from opencl/invert.cl.h
rename to opencl/invert-linear.cl.h
index 05b9d57..1988dfe 100644
--- a/opencl/invert.cl.h
+++ b/opencl/invert-linear.cl.h
@@ -1,6 +1,6 @@
-static const char* invert_cl_source =
-"__kernel void gegl_invert (__global const float4     *in,                     \n"
-"                           __global       float4     *out)                    \n"
+static const char* invert_linear_cl_source =
+"__kernel void gegl_invert_linear (__global const float4     *in,              \n"
+"                                  __global       float4     *out)             \n"
 "{                                                                             \n"
 "  int gid = get_global_id(0);                                                 \n"
 "  float4 in_v  = in[gid];                                                     \n"
diff --git a/operations/common/high-pass.c b/operations/common/high-pass.c
index 068e788..63981a4 100644
--- a/operations/common/high-pass.c
+++ b/operations/common/high-pass.c
@@ -41,7 +41,7 @@ attach (GeglOperation *operation)
   gegl = operation->node;
   input = gegl_node_get_input_proxy (gegl, "input");
   output = gegl_node_get_output_proxy (gegl, "output");
-  invert = gegl_node_new_child (gegl, "operation", "gegl:invert", NULL);
+  invert = gegl_node_new_child (gegl, "operation", "gegl:invert-linear", NULL);
   blur = gegl_node_new_child (gegl, "operation", "gegl:gaussian-blur", NULL);
   opacity = gegl_node_new_child (gegl, "operation", "gegl:opacity",
                                  "value", 0.5, NULL);
diff --git a/operations/common/invert.c b/operations/common/invert-linear.c
similarity index 88%
rename from operations/common/invert.c
rename to operations/common/invert-linear.c
index d8627ff..b31c70b 100644
--- a/operations/common/invert.c
+++ b/operations/common/invert-linear.c
@@ -27,8 +27,7 @@
 #else
 
 #define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE       "invert.c"
-#define GEGLV4
+#define GEGL_CHANT_C_FILE       "invert-linear.c"
 
 #include "gegl-chant.h"
 
@@ -56,7 +55,7 @@ process (GeglOperation       *op,
   return TRUE;
 }
 
-#include "opencl/invert.cl.h"
+#include "opencl/invert-linear.cl.h"
 
 static void
 gegl_chant_class_init (GeglChantClass *klass)
@@ -67,15 +66,16 @@ gegl_chant_class_init (GeglChantClass *klass)
   operation_class    = GEGL_OPERATION_CLASS (klass);
   point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
 
-  point_filter_class->process = process;
+  operation_class->compat_name = "gegl:invert";
+  point_filter_class->process  = process;
 
   gegl_operation_class_set_keys (operation_class,
-    "name"       , "gegl:invert",
+    "name"       , "gegl:invert-linear",
     "categories" , "color",
     "description",
        _("Inverts the components (except alpha), the result is the "
          "corresponding \"negative\" image."),
-    "cl-source"  , invert_cl_source,
+    "cl-source"  , invert_linear_cl_source,
     NULL);
 }
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f151560..5d0a8e3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -39,7 +39,7 @@ operations/common/grid.c
 operations/common/high-pass.c
 operations/common/image-compare.c
 operations/common/introspect.c
-operations/common/invert.c
+operations/common/invert-linear.c
 operations/common/layer.c
 operations/common/lens-distortion.c
 operations/common/levels.c
diff --git a/tests/compositions/clones.xml b/tests/compositions/clones.xml
index c10d31a..35923cc 100644
--- a/tests/compositions/clones.xml
+++ b/tests/compositions/clones.xml
@@ -57,7 +57,7 @@
             <param name='y'>100.000000</param>
           </params>
       </node>
-      <node operation='gegl:invert'>
+      <node operation='gegl:invert-linear'>
       </node>
       <node operation='gegl:scale-ratio'>
           <params>
diff --git a/tests/opencl/Makefile.am b/tests/opencl/Makefile.am
index d6c33dd..0dedaa3 100644
--- a/tests/opencl/Makefile.am
+++ b/tests/opencl/Makefile.am
@@ -24,7 +24,7 @@ TESTS = \
   run-color-temperature.xml.sh   \
   run-edge-sobel.xml.sh          \
   run-gaussian-blur.xml.sh       \
-  run-invert.xml.sh              \
+  run-invert-linear.xml.sh       \
   run-levels.xml.sh              \
   run-mono-mixer.xml.sh          \
   run-motion-blur.xml.sh         \
diff --git a/tests/opencl/invert.xml b/tests/opencl/invert-linear.xml
similarity index 83%
rename from tests/opencl/invert.xml
rename to tests/opencl/invert-linear.xml
index 9d0a4cd..82aded2 100644
--- a/tests/opencl/invert.xml
+++ b/tests/opencl/invert-linear.xml
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <gegl>
-  <node operation='gegl:invert'>
+  <node operation='gegl:invert-linear'>
   </node>
   <node operation='gegl:load'>
     <params>
diff --git a/tests/python/test-gegl-node.py b/tests/python/test-gegl-node.py
index 81d97a6..cedc54c 100755
--- a/tests/python/test-gegl-node.py
+++ b/tests/python/test-gegl-node.py
@@ -23,7 +23,7 @@ from gi.repository import Gegl
 
 invert_crop_xml = """<?xml version='1.0' encoding='UTF-8'?>
 <gegl>
-  <node operation='gegl:invert'>
+  <node operation='gegl:invert-linear'>
   </node>
   <node operation='gegl:crop'>
       <params>
@@ -125,7 +125,7 @@ class TestGeglXml(unittest.TestCase):
         self.assertEqual(len(children), 2)
 
         self.assertEqual(children[0].get_operation(), "gegl:crop")
-        self.assertEqual(children[1].get_operation(), "gegl:invert")
+        self.assertEqual(children[1].get_operation(), "gegl:invert-linear")
 
     def test_load_save_roundtrip(self):
         graph = Gegl.Node.new_from_xml(invert_crop_xml, "")
diff --git a/tests/xml/test-load.c b/tests/xml/test-load.c
index 542a6da..1a90fb1 100644
--- a/tests/xml/test-load.c
+++ b/tests/xml/test-load.c
@@ -55,7 +55,7 @@ test_load_multiple_nodes (void)
     const gchar * const xml = \
 "<?xml version='1.0' encoding='UTF-8'?>\n\
 <gegl>\n\
-  <node operation='gegl:invert'>\n\
+  <node operation='gegl:invert-linear'>\n\
   </node>\n\
   <node operation='gegl:crop'>\n\
       <params>\n\
@@ -84,7 +84,7 @@ test_load_multiple_nodes (void)
 
     node = GEGL_NODE(g_slist_nth_data(children, 1));
     gegl_node_get(node, "operation", &op_name, NULL);
-    g_assert_cmpstr(op_name, ==, "gegl:invert");
+    g_assert_cmpstr(op_name, ==, "gegl:invert-linear");
     g_free(op_name);
 
        g_slist_free(children);
@@ -100,7 +100,7 @@ test_load_subgraph (void)
 "<?xml version='1.0' encoding='UTF-8'?>\n\
 <gegl>\n\
     <node>\n\
-          <node operation='gegl:invert'>\n\
+          <node operation='gegl:invert-linear'>\n\
           </node>\n\
           <node operation='gegl:crop'>\n\
               <params>\n\
@@ -147,7 +147,7 @@ test_load_subgraph (void)
 
     node = GEGL_NODE(g_slist_nth_data(subgraph_children, 1));
     gegl_node_get(node, "operation", &op_name, NULL);
-    g_assert_cmpstr(op_name, ==, "gegl:invert");
+    g_assert_cmpstr(op_name, ==, "gegl:invert-linear");
     g_free(op_name);
 
        g_slist_free(subgraph_children);
diff --git a/tests/xml/test-save.c b/tests/xml/test-save.c
index c7201d4..e57c552 100644
--- a/tests/xml/test-save.c
+++ b/tests/xml/test-save.c
@@ -75,7 +75,7 @@ test_save_multiple_nodes (void)
     const gchar * const expected_result = \
 "<?xml version='1.0' encoding='UTF-8'?>\n\
 <gegl>\n\
-  <node operation='gegl:invert'>\n\
+  <node operation='gegl:invert-linear'>\n\
   </node>\n\
   <node operation='gegl:crop'>\n\
       <params>\n\
@@ -95,7 +95,7 @@ test_save_multiple_nodes (void)
                               "x", 0.0, "y", 0.0,
                               "width", 0.0, "height", 0.0,
                               NULL);
-    op2 = gegl_node_new_child(graph, "operation", "gegl:invert", NULL);
+    op2 = gegl_node_new_child(graph, "operation", "gegl:invert-linear", NULL);
     gegl_node_link_many(op1, op2, NULL);
 
     xml = gegl_node_to_xml(op2, "");
@@ -114,7 +114,7 @@ test_save_toplevel_graph (void)
     const gchar * const expected_result = \
 "<?xml version='1.0' encoding='UTF-8'?>\n\
 <gegl>\n\
-  <node operation='gegl:invert'>\n\
+  <node operation='gegl:invert-linear'>\n\
   </node>\n\
   <node operation='gegl:crop'>\n\
       <params>\n\
@@ -134,7 +134,7 @@ test_save_toplevel_graph (void)
                               "x", 0.0, "y", 0.0,
                               "width", 0.0, "height", 0.0,
                               NULL);
-    op2 = gegl_node_new_child(graph, "operation", "gegl:invert", NULL);
+    op2 = gegl_node_new_child(graph, "operation", "gegl:invert-linear", NULL);
     gegl_node_link_many(op1, op2, NULL);
 
     xml = gegl_node_to_xml(graph, "");


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