[gimp] app: in gimp_composite_blend(), avoid an alloca when doing in-place output



commit 4d985d11df204313db04cc7bf803066c61bb38d6
Author: Ell <ell_se yahoo com>
Date:   Sat Jan 21 06:36:03 2017 -0500

    app: in gimp_composite_blend(), avoid an alloca when doing in-place output

 app/operations/layer-modes/gimpblendcomposite.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/operations/layer-modes/gimpblendcomposite.h b/app/operations/layer-modes/gimpblendcomposite.h
index 88a0ff4..0feb5dc 100644
--- a/app/operations/layer-modes/gimpblendcomposite.h
+++ b/app/operations/layer-modes/gimpblendcomposite.h
@@ -318,7 +318,7 @@ gimp_composite_blend (gfloat                 *in,
           if (composite_mode == GIMP_LAYER_COMPOSITE_SRC_OVER ||
               composite_mode == GIMP_LAYER_COMPOSITE_SRC_ATOP)
             {
-              if (composite_in == in)
+              if (composite_in == in && in != out)
                 composite_in = g_alloca (sizeof (gfloat) * 4 * samples);
 
               babl_process (fish_to_composite,


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