[gimp] app: in gimp_composite_blend(), avoid overwriting input in some cases



commit f6436eee96eacde532d5cfd20e1e65685e69927e
Author: Ell <ell_se yahoo com>
Date:   Thu Jan 19 13:51:48 2017 -0500

    app: in gimp_composite_blend(), avoid overwriting input in some cases
    
    Note that in some cases the alloca may be unnecessary, but this keeps
    the code clean, and we have to be able to *potentially* do the alloca
    anyway, so what the hell.

 app/operations/layer-modes/gimpblendcomposite.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/app/operations/layer-modes/gimpblendcomposite.h b/app/operations/layer-modes/gimpblendcomposite.h
index f509420..ddcb232 100644
--- a/app/operations/layer-modes/gimpblendcomposite.h
+++ b/app/operations/layer-modes/gimpblendcomposite.h
@@ -290,10 +290,14 @@ gimp_composite_blend (gfloat                 *in,
                     read it for the compositing stage  */
     blend_out = g_alloca (sizeof (gfloat) * 4 * samples);
 
-  if (fish_to_blend)
+  if (fish_to_blend || fish_to_composite)
     {
       blend_in    = g_alloca (sizeof (gfloat) * 4 * samples);
       blend_layer = g_alloca (sizeof (gfloat) * 4 * samples);
+    }
+
+  if (fish_to_blend)
+    {
       babl_process (fish_to_blend, in,    blend_in,  samples);
       babl_process (fish_to_blend, layer, blend_layer,  samples);
     }


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