[gimp/goat-invasion] app: all Babls used by GIMP are now const



commit 3c97f56c34c3c6a0e5fcd706e22086cb9c5ebf5f
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Sun Mar 18 16:48:42 2012 +0000

    app: all Babls used by GIMP are now const

 app/core/gimpimage-private.h           |    4 ++--
 app/gegl/gimpoperationcagecoefcalc.c   |    3 ++-
 app/gegl/gimpoperationcagetransform.c  |    6 +++---
 app/gegl/gimpoperationcagetransform.h  |    2 +-
 app/gegl/gimpoperationpointlayermode.c |   10 +++++-----
 app/tools/gimpcagetool.c               |    2 +-
 6 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/app/core/gimpimage-private.h b/app/core/gimpimage-private.h
index 913b6fe..97dcc46 100644
--- a/app/core/gimpimage-private.h
+++ b/app/core/gimpimage-private.h
@@ -50,8 +50,8 @@ struct _GimpImagePrivate
   guchar            *colormap;              /*  colormap (for indexed)       */
   gint               n_colors;              /*  # of colors (for indexed)    */
   GimpPalette       *palette;               /*  palette of colormap          */
-  Babl              *babl_palette_rgb;      /*  palette's RGB Babl format    */
-  Babl              *babl_palette_rgba;     /*  palette's RGBA Babl format   */
+  const Babl        *babl_palette_rgb;      /*  palette's RGB Babl format    */
+  const Babl        *babl_palette_rgba;     /*  palette's RGBA Babl format   */
 
   gint               dirty;                 /*  dirty flag -- # of ops       */
   guint              dirty_time;            /*  time when image became dirty */
diff --git a/app/gegl/gimpoperationcagecoefcalc.c b/app/gegl/gimpoperationcagecoefcalc.c
index 30e8c9e..d6370ea 100644
--- a/app/gegl/gimpoperationcagecoefcalc.c
+++ b/app/gegl/gimpoperationcagecoefcalc.c
@@ -196,7 +196,8 @@ gimp_operation_cage_coef_calc_process (GeglOperation       *operation,
   GimpOperationCageCoefCalc *occc   = GIMP_OPERATION_CAGE_COEF_CALC (operation);
   GimpCageConfig            *config = GIMP_CAGE_CONFIG (occc->config);
 
-  Babl *format = babl_format_n (babl_type ("float"), 2 * gimp_cage_config_get_n_points (config));
+  const Babl *format = babl_format_n (babl_type ("float"),
+                                      2 * gimp_cage_config_get_n_points (config));
 
   GeglBufferIterator *it;
   guint               n_cage_vertices;
diff --git a/app/gegl/gimpoperationcagetransform.c b/app/gegl/gimpoperationcagetransform.c
index e62e71d..e43b71f 100644
--- a/app/gegl/gimpoperationcagetransform.c
+++ b/app/gegl/gimpoperationcagetransform.c
@@ -71,7 +71,7 @@ static void         gimp_operation_cage_transform_interpolate_source_coords_recu
                                                                            gfloat              *coords);
 static GimpVector2  gimp_cage_transform_compute_destination               (GimpCageConfig      *config,
                                                                            gfloat              *coef,
-                                                                           Babl                *format_coef,
+                                                                           const Babl          *format_coef,
                                                                            GeglBuffer          *coef_buf,
                                                                            GimpVector2          coords);
 GeglRectangle       gimp_operation_cage_transform_get_cached_region       (GeglOperation       *operation,
@@ -231,7 +231,7 @@ gimp_operation_cage_transform_process (GeglOperation       *operation,
   GeglRectangle               cage_bb;
   gfloat                     *coords;
   gfloat                     *coef;
-  Babl                       *format_coef;
+  const Babl                 *format_coef;
   GimpVector2                 plain_color;
   GeglBufferIterator         *it;
   gint                        x, y;
@@ -541,7 +541,7 @@ gimp_operation_cage_transform_interpolate_source_coords_recurs (GimpOperationCag
 static GimpVector2
 gimp_cage_transform_compute_destination (GimpCageConfig *config,
                                          gfloat         *coef,
-                                         Babl           *format_coef,
+                                         const Babl     *format_coef,
                                          GeglBuffer     *coef_buf,
                                          GimpVector2     coords)
 {
diff --git a/app/gegl/gimpoperationcagetransform.h b/app/gegl/gimpoperationcagetransform.h
index fead68e..b844baa 100644
--- a/app/gegl/gimpoperationcagetransform.h
+++ b/app/gegl/gimpoperationcagetransform.h
@@ -42,7 +42,7 @@ struct _GimpOperationCageTransform
   GimpCageConfig        *config;
   gboolean               fill_plain_color;
 
-  Babl                  *format_coords;
+  const Babl            *format_coords;
 
   gdouble                progress; /* bad hack */
 };
diff --git a/app/gegl/gimpoperationpointlayermode.c b/app/gegl/gimpoperationpointlayermode.c
index c0977e4..71fe531 100644
--- a/app/gegl/gimpoperationpointlayermode.c
+++ b/app/gegl/gimpoperationpointlayermode.c
@@ -179,7 +179,7 @@ gimp_operation_point_layer_mode_get_property (GObject    *object,
 static void
 gimp_operation_point_layer_mode_prepare (GeglOperation *operation)
 {
-  Babl *format = babl_format ("RaGaBaA float");
+  const Babl *format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input",  format);
   gegl_operation_set_format (operation, "output", format);
@@ -195,10 +195,10 @@ gimp_operation_point_layer_mode_get_new_color_lchab (GimpLayerModeEffects  blend
   float in_lchab[3];
   float lay_lchab[3];
   float new_lchab[3];
-  Babl *ragabaa_to_lchab = babl_fish (babl_format ("RaGaBaA float"),
-                                      babl_format ("CIE LCH(ab) float"));
-  Babl *lchab_to_ragabaa = babl_fish (babl_format ("CIE LCH(ab) float"),
-                                      babl_format ("RaGaBaA float"));
+  const Babl *ragabaa_to_lchab = babl_fish (babl_format ("RaGaBaA float"),
+                                            babl_format ("CIE LCH(ab) float"));
+  const Babl *lchab_to_ragabaa = babl_fish (babl_format ("CIE LCH(ab) float"),
+                                            babl_format ("RaGaBaA float"));
 
   babl_process (ragabaa_to_lchab, (void*)in,  (void*)in_lchab,  1);
   babl_process (ragabaa_to_lchab, (void*)lay, (void*)lay_lchab, 1);
diff --git a/app/tools/gimpcagetool.c b/app/tools/gimpcagetool.c
index a4b50d9..2c46e32 100644
--- a/app/tools/gimpcagetool.c
+++ b/app/tools/gimpcagetool.c
@@ -1083,7 +1083,7 @@ gimp_cage_tool_compute_coef (GimpCageTool *ct)
 {
   GimpCageConfig *config = ct->config;
   GimpProgress   *progress;
-  Babl           *format;
+  const Babl     *format;
   GeglNode       *gegl;
   GeglNode       *input;
   GeglNode       *output;



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