[gimp] app: remove gimp-scratch; replace with gegl-scratch



commit 889e2e26eecc3ad4daffc6e05e86c18fd1e07895
Author: Ell <ell_se yahoo com>
Date:   Sun Jan 6 07:06:49 2019 -0500

    app: remove gimp-scratch; replace with gegl-scratch
    
    The scratch allocator has been moved to GEGL (commit
    gegl@b99032d799dda3436ffa8c1cc28f8b0d34fb965d).  Remove gimp-
    scratch, and replace all its uses with gegl-scratch.

 app/Makefile.am                                    |   3 +-
 app/config/Makefile.am                             |   3 +-
 app/core/Makefile.am                               |   2 -
 app/core/gimp-scratch.c                            | 100 -------------
 app/core/gimp-scratch.h                            | 166 ---------------------
 .../layer-modes/gimpoperationlayermode-blend.c     |   6 +-
 app/tests/Makefile.am                              |   3 +-
 app/widgets/gimpdashboard.c                        |   5 +-
 8 files changed, 7 insertions(+), 281 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index 8ce4c621ba..cb7f8f61b0 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -149,8 +149,7 @@ AM_LDFLAGS = \
        -Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy            \
        -Wl,-u,$(SYMPREFIX)gimp_parallel_init                   \
        -Wl,-u,$(SYMPREFIX)gimp_async_set_new                   \
-       -Wl,-u,$(SYMPREFIX)gimp_uncancelable_waitable_new       \
-       -Wl,-u,$(SYMPREFIX)gimp_scratch_block_new
+       -Wl,-u,$(SYMPREFIX)gimp_uncancelable_waitable_new
 
 gimpconsoleldadd = \
        xcf/libappxcf.a                                         \
diff --git a/app/config/Makefile.am b/app/config/Makefile.am
index 4408a158c7..96a6913fb9 100644
--- a/app/config/Makefile.am
+++ b/app/config/Makefile.am
@@ -95,8 +95,7 @@ test_config_LDFLAGS = \
        -Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec           \
        -Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy            \
        -Wl,-u,$(SYMPREFIX)gimp_async_set_new                   \
-       -Wl,-u,$(SYMPREFIX)gimp_uncancelable_waitable_new       \
-       -Wl,-u,$(SYMPREFIX)gimp_scratch_block_new
+       -Wl,-u,$(SYMPREFIX)gimp_uncancelable_waitable_new
 
 test_config_LDADD = \
        ../xcf/libappxcf.a                                              \
diff --git a/app/core/Makefile.am b/app/core/Makefile.am
index 97354d42b4..585b8057e4 100644
--- a/app/core/Makefile.am
+++ b/app/core/Makefile.am
@@ -72,8 +72,6 @@ libappcore_a_sources = \
        gimp-parallel.h                         \
        gimp-parasites.c                        \
        gimp-parasites.h                        \
-       gimp-scratch.c                          \
-       gimp-scratch.h                          \
        gimp-spawn.c                            \
        gimp-spawn.h                            \
        gimp-tags.c                             \
diff --git a/app/operations/layer-modes/gimpoperationlayermode-blend.c 
b/app/operations/layer-modes/gimpoperationlayermode-blend.c
index cb54fcae3c..ff91097523 100644
--- a/app/operations/layer-modes/gimpoperationlayermode-blend.c
+++ b/app/operations/layer-modes/gimpoperationlayermode-blend.c
@@ -32,8 +32,6 @@
 
 #include "../operations-types.h"
 
-#include "core/gimp-scratch.h"
-
 #include "gimpoperationlayermode-blend.h"
 
 
@@ -876,7 +874,7 @@ gimp_operation_layer_mode_blend_luminance (const gfloat *in,
   if (! fish)
     fish = babl_fish ("RGBA float", "Y float");
 
-  scratch = gimp_scratch_new (gfloat, 2 * samples);
+  scratch = gegl_scratch_new (gfloat, 2 * samples);
 
   in_Y    = scratch;
   layer_Y = scratch + samples;
@@ -904,7 +902,7 @@ gimp_operation_layer_mode_blend_luminance (const gfloat *in,
       layer_Y ++;
     }
 
-  gimp_scratch_free (scratch);
+  gegl_scratch_free (scratch);
 }
 
 void
diff --git a/app/tests/Makefile.am b/app/tests/Makefile.am
index 4e0d5057b9..f0d16c608a 100644
--- a/app/tests/Makefile.am
+++ b/app/tests/Makefile.am
@@ -91,8 +91,7 @@ AM_LDFLAGS = \
        -Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy            \
        -Wl,-u,$(SYMPREFIX)gui_init                             \
        -Wl,-u,$(SYMPREFIX)gimp_tool_cursors_get_resource       \
-       -Wl,-u,$(SYMPREFIX)gimp_lebl_dialog                     \
-       -Wl,-u,$(SYMPREFIX)gimp_scratch_block_new
+       -Wl,-u,$(SYMPREFIX)gimp_lebl_dialog
 
 # Note that we have some duplicate entries here too to work around
 # circular dependencies and systems on the same architectural layer as
diff --git a/app/widgets/gimpdashboard.c b/app/widgets/gimpdashboard.c
index 9b22890627..45e9114b2c 100644
--- a/app/widgets/gimpdashboard.c
+++ b/app/widgets/gimpdashboard.c
@@ -57,7 +57,6 @@
 #include "core/gimp-gui.h"
 #include "core/gimp-utils.h"
 #include "core/gimp-parallel.h"
-#include "core/gimp-scratch.h"
 #include "core/gimpasync.h"
 #include "core/gimpbacktrace.h"
 #include "core/gimpwaitable.h"
@@ -695,8 +694,8 @@ static const VariableInfo variables[] =
     .title            = NC_("dashboard-variable", "Scratch"),
     .description      = N_("Total size of scratch memory"),
     .type             = VARIABLE_TYPE_SIZE,
-    .sample_func      = gimp_dashboard_sample_function,
-    .data             = gimp_scratch_get_total
+    .sample_func      = gimp_dashboard_sample_gegl_stats,
+    .data             = "scratch-total"
   }
 };
 


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