[gimp/pippin/linear-is-the-new-black: 3/9] app: ignore non-linear precision layer mode functions



commit deca5ef1482633746e45964f4e6c97320dfc9eb6
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Jan 17 16:47:12 2017 +0100

    app: ignore non-linear precision layer mode functions

 .../layer-modes/gimplayermodefunctions.c           |    5 ++---
 .../layer-modes/gimplayermodefunctions.h           |    3 +--
 app/paint/gimppaintcore-loops.c                    |    8 ++------
 3 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/app/operations/layer-modes/gimplayermodefunctions.c 
b/app/operations/layer-modes/gimplayermodefunctions.c
index e59c4ef..6c2437a 100644
--- a/app/operations/layer-modes/gimplayermodefunctions.c
+++ b/app/operations/layer-modes/gimplayermodefunctions.c
@@ -78,11 +78,10 @@
 
 
 GimpLayerModeFunc
-gimp_get_layer_mode_function (GimpLayerMode  paint_mode,
-                              gboolean       linear_mode)
+gimp_get_layer_mode_function (GimpLayerMode  paint_mode)
 {
   GimpLayerModeFunc func;
-
+  gboolean linear_mode = TRUE;
   switch (paint_mode)
     {
     case GIMP_LAYER_MODE_NORMAL:
diff --git a/app/operations/layer-modes/gimplayermodefunctions.h 
b/app/operations/layer-modes/gimplayermodefunctions.h
index 618824d..9510dbf 100644
--- a/app/operations/layer-modes/gimplayermodefunctions.h
+++ b/app/operations/layer-modes/gimplayermodefunctions.h
@@ -22,8 +22,7 @@
 #define __GIMP_LAYER_MODE_FUNCTIONS_H__
 
 
-GimpLayerModeFunc   gimp_get_layer_mode_function (GimpLayerMode  paint_mode,
-                                                  gboolean       linear_mode);
+GimpLayerModeFunc   gimp_get_layer_mode_function (GimpLayerMode  paint_mode);
 
 
 #endif /* __GIMP_LAYER_MODE_FUNCTIONS_H__ */
diff --git a/app/paint/gimppaintcore-loops.c b/app/paint/gimppaintcore-loops.c
index fe07232..132b6c5 100644
--- a/app/paint/gimppaintcore-loops.c
+++ b/app/paint/gimppaintcore-loops.c
@@ -308,13 +308,9 @@ do_layer_blend (GeglBuffer    *src_buffer,
 
   const guint         paint_stride = gimp_temp_buf_get_width (paint_buf);
   gfloat             *paint_data   = (gfloat *) gimp_temp_buf_get_data (paint_buf);
-  GimpLayerModeFunc   apply_func   = gimp_get_layer_mode_function (paint_mode,
-                                                                   linear_mode);
+  GimpLayerModeFunc   apply_func   = gimp_get_layer_mode_function (paint_mode);
 
-  if (linear_mode)
-    iterator_format = babl_format ("RGBA float");
-  else
-    iterator_format = babl_format ("R'G'B'A float");
+  iterator_format = babl_format ("RGBA float");
 
   roi.x = x_offset;
   roi.y = y_offset;


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