gegl-0.2.0-remove-src-over-op.patch 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. From 72168aba34445e4cd99aaed32d8e6a80e89ce729 Mon Sep 17 00:00:00 2001
  2. From: Nils Philippsen <nils@redhat.com>
  3. Date: Mon, 1 Jul 2013 13:53:18 +0200
  4. Subject: [PATCH] patch: remove-src-over-op
  5. Squashed commit of the following:
  6. commit b766094d951bf1515a75408ee85d4e1af432e6bd
  7. Author: Daniel Sabo <DanielSabo@gmail.com>
  8. Date: Tue Jun 4 20:57:03 2013 -0700
  9. Remove auto-generated svg:src-over
  10. It was already shadowed by gegl:over, which declares
  11. svg:src-over as a compat-name.
  12. (cherry picked from commit c1caf2401271e8a17fd1937bf84279c250bd8e2a)
  13. Conflicts:
  14. po/POTFILES.in
  15. ---
  16. operations/generated/src-over.c | 122 -----------------------------
  17. operations/generated/svg-12-porter-duff.rb | 5 +-
  18. po/POTFILES.in | 3 +-
  19. 3 files changed, 4 insertions(+), 126 deletions(-)
  20. delete mode 100644 operations/generated/src-over.c
  21. diff --git a/operations/generated/src-over.c b/operations/generated/src-over.c
  22. deleted file mode 100644
  23. index e586087..0000000
  24. --- a/operations/generated/src-over.c
  25. +++ /dev/null
  26. @@ -1,122 +0,0 @@
  27. -
  28. -/* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
  29. - *
  30. - * This file is an image processing operation for GEGL
  31. - *
  32. - * GEGL is free software; you can redistribute it and/or
  33. - * modify it under the terms of the GNU Lesser General Public
  34. - * License as published by the Free Software Foundation; either
  35. - * version 3 of the License, or (at your option) any later version.
  36. - *
  37. - * GEGL is distributed in the hope that it will be useful,
  38. - * but WITHOUT ANY WARRANTY; without even the implied warranty of
  39. - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  40. - * Lesser General Public License for more details.
  41. - *
  42. - * You should have received a copy of the GNU Lesser General Public
  43. - * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
  44. - *
  45. - * Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
  46. - * 2007 John Marshall
  47. - *
  48. - * SVG rendering modes; see:
  49. - * http://www.w3.org/TR/SVG12/rendering.html
  50. - * http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#comp-op-prop
  51. - *
  52. - * aA = aux(src) alpha aB = in(dst) alpha aD = out alpha
  53. - * cA = aux(src) colour cB = in(dst) colour cD = out colour
  54. - *
  55. - * !!!! AUTOGENERATED FILE !!!!!
  56. - */
  57. -#include "config.h"
  58. -#include <glib/gi18n-lib.h>
  59. -
  60. -
  61. -#ifdef GEGL_CHANT_PROPERTIES
  62. -
  63. -/* no properties */
  64. -
  65. -#else
  66. -
  67. -#define GEGL_CHANT_TYPE_POINT_COMPOSER
  68. -#define GEGL_CHANT_C_FILE "src-over.c"
  69. -
  70. -#include "gegl-chant.h"
  71. -
  72. -static void prepare (GeglOperation *operation)
  73. -{
  74. - const Babl *format = babl_format ("RaGaBaA float");
  75. -
  76. - gegl_operation_set_format (operation, "input", format);
  77. - gegl_operation_set_format (operation, "aux", format);
  78. - gegl_operation_set_format (operation, "output", format);
  79. -}
  80. -
  81. -static gboolean
  82. -process (GeglOperation *op,
  83. - void *in_buf,
  84. - void *aux_buf,
  85. - void *out_buf,
  86. - glong n_pixels,
  87. - const GeglRectangle *roi,
  88. - gint level)
  89. -{
  90. - gint i;
  91. - gfloat * GEGL_ALIGNED in = in_buf;
  92. - gfloat * GEGL_ALIGNED aux = aux_buf;
  93. - gfloat * GEGL_ALIGNED out = out_buf;
  94. -
  95. - if (aux==NULL)
  96. - return TRUE;
  97. -
  98. - for (i = 0; i < n_pixels; i++)
  99. - {
  100. - gint j;
  101. - gfloat aA G_GNUC_UNUSED, aB G_GNUC_UNUSED, aD G_GNUC_UNUSED;
  102. -
  103. - aB = in[3];
  104. - aA = aux[3];
  105. - aD = aA + aB - aA * aB;
  106. -
  107. - for (j = 0; j < 3; j++)
  108. - {
  109. - gfloat cA G_GNUC_UNUSED, cB G_GNUC_UNUSED;
  110. -
  111. - cB = in[j];
  112. - cA = aux[j];
  113. - out[j] = cA + cB * (1.0f - aA);
  114. - }
  115. - out[3] = aD;
  116. - in += 4;
  117. - aux += 4;
  118. - out += 4;
  119. - }
  120. - return TRUE;
  121. -}
  122. -
  123. -
  124. -static void
  125. -gegl_chant_class_init (GeglChantClass *klass)
  126. -{
  127. - GeglOperationClass *operation_class;
  128. - GeglOperationPointComposerClass *point_composer_class;
  129. -
  130. - operation_class = GEGL_OPERATION_CLASS (klass);
  131. - point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
  132. -
  133. - point_composer_class->process = process;
  134. - operation_class->prepare = prepare;
  135. -
  136. -
  137. - operation_class->compat_name = "gegl:src-over";
  138. - gegl_operation_class_set_keys (operation_class,
  139. - "name" , "svg:src-over",
  140. - "categories", "compositors:porter-duff",
  141. - "description",
  142. - _("Porter Duff operation src-over (d = cA + cB * (1.0f - aA))"),
  143. - NULL);
  144. -
  145. -
  146. -}
  147. -
  148. -#endif
  149. diff --git a/operations/generated/svg-12-porter-duff.rb b/operations/generated/svg-12-porter-duff.rb
  150. index 5516802..dab5d2f 100755
  151. --- a/operations/generated/svg-12-porter-duff.rb
  152. +++ b/operations/generated/svg-12-porter-duff.rb
  153. @@ -1,4 +1,5 @@
  154. #!/usr/bin/env ruby
  155. +# encoding: utf-8
  156. copyright = '
  157. /* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
  158. @@ -38,8 +39,8 @@ a = [
  159. 'aA'],
  160. ['dst', 'cB',
  161. 'aB'],
  162. - ['src_over', 'cA + cB * (1.0f - aA)',
  163. - 'aA + aB - aA * aB'],
  164. +# ['src_over', 'cA + cB * (1.0f - aA)',
  165. +# 'aA + aB - aA * aB'],
  166. ['dst_over', 'cB + cA * (1.0f - aB)',
  167. 'aA + aB - aA * aB'],
  168. ['dst_in', 'cB * aA', # <- XXX: typo?
  169. diff --git a/po/POTFILES.in b/po/POTFILES.in
  170. index e309594..d36cbc2 100644
  171. --- a/po/POTFILES.in
  172. +++ b/po/POTFILES.in
  173. @@ -115,10 +115,9 @@ operations/generated/plus.c
  174. operations/generated/screen.c
  175. operations/generated/soft-light.c
  176. operations/generated/src-atop.c
  177. +operations/generated/src.c
  178. operations/generated/src-in.c
  179. operations/generated/src-out.c
  180. -operations/generated/src-over.c
  181. -operations/generated/src.c
  182. operations/generated/subtract.c
  183. operations/generated/svg-multiply.c
  184. operations/generated/xor.c
  185. --
  186. 1.8.3.1