[gegl] Avoid a conflict with multiply op between svg-12-blend.rb and math.rb



commit afe032e8d970ea2e2f4f9d3cbf96c049b2c6b9bb
Author: Mukund Sivaraman <muks banu com>
Date:   Mon Apr 23 00:54:23 2012 +0530

    Avoid a conflict with multiply op between svg-12-blend.rb and math.rb
    
    Also regenerate the svg-multiply.c file.

 operations/generated/svg-12-blend.rb |    6 ++++--
 operations/generated/svg-multiply.c  |   24 +++++++++++++-----------
 2 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/operations/generated/svg-12-blend.rb b/operations/generated/svg-12-blend.rb
index be46c8f..808dcff 100755
--- a/operations/generated/svg-12-blend.rb
+++ b/operations/generated/svg-12-blend.rb
@@ -138,7 +138,9 @@ a.each do
 
     name     = item[0] + ''
     name.gsub!(/_/, '-')
-    filename = name + '.c'
+    # hack to avoid a conflict with multiply op generated by math.rb
+    compat_name = (name == 'multiply' ? 'svg-' : '') + name
+    filename = compat_name + '.c'
 
     puts "generating #{filename}"
     file = File.open(filename, 'w')
@@ -182,7 +184,7 @@ a.each do
 "
   file.write file_tail1
   file.write "
-  operation_class->compat_name = \"gegl:#{name}\";
+  operation_class->compat_name = \"gegl:#{compat_name}\";
 
   gegl_operation_class_set_keys (operation_class,
   \"name\"        , \"svg:#{name}\",
diff --git a/operations/generated/svg-multiply.c b/operations/generated/svg-multiply.c
index 2c1385c..25ff7fc 100644
--- a/operations/generated/svg-multiply.c
+++ b/operations/generated/svg-multiply.c
@@ -1,5 +1,5 @@
 
-/* !!!! AUTOGENERATED FILE generated by svg12-blend.rb !!!!! 
+/* !!!! AUTOGENERATED FILE generated by svg12-blend.rb !!!!!
  *
  * This file is an image processing operation for GEGL
  *
@@ -17,7 +17,7 @@
  * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
  *
  *  Copyright 2006, 2007 Ãyvind KolÃs <pippin gimp org>
- *            2007 John Marshall  
+ *            2007 John Marshall
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -59,11 +59,11 @@ process (GeglOperation       *op,
          void                *out_buf,
          glong                n_pixels,
          const GeglRectangle *roi,
-         int                  level)
+         gint                 level)
 {
-  gfloat *in = in_buf;
-  gfloat *aux = aux_buf;
-  gfloat *out = out_buf;
+  gfloat * GEGL_ALIGNED in = in_buf;
+  gfloat * GEGL_ALIGNED aux = aux_buf;
+  gfloat * GEGL_ALIGNED out = out_buf;
   gint    i;
 
   if (aux==NULL)
@@ -107,12 +107,14 @@ gegl_chant_class_init (GeglChantClass *klass)
   point_composer_class->process = process;
   operation_class->prepare = prepare;
 
+  operation_class->compat_name = "gegl:svg-multiply";
+
   gegl_operation_class_set_keys (operation_class,
-  "name"       , "gegl:svg-multiply",
-  "categories" , "compositors:svgfilter",
-  "description",
-        _("SVG blend operation svg-multiply (<tt>d = cA * cB +  cA * (1 - aB) + cB * (1 - aA)</tt>)"),
-  NULL);
+  "name"        , "svg:multiply",
+  "description" ,
+        _("SVG blend operation multiply (<code>d = cA * cB +  cA * (1 - aB) + cB * (1 - aA)</code>)"),
+        NULL);
+  gegl_operation_class_set_key (operation_class, "categories", "compositors:svgfilter");
 }
 
 #endif



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