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



commit fbf73bee70beaee74ce3bf2f4731ee5c3980008b
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.
    
    (cherry picked from commit 889e2e26eecc3ad4daffc6e05e86c18fd1e07895)

 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 824b7d2603..46dd220bd0 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 942a9c0a76..c3df49f3bc 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 e4f27331a8..e0597e0610 100644
--- a/app/core/Makefile.am
+++ b/app/core/Makefile.am
@@ -70,8 +70,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 f9154e02f5..7584073035 100644
--- a/app/tests/Makefile.am
+++ b/app/tests/Makefile.am
@@ -90,8 +90,7 @@ AM_LDFLAGS = \
        -Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec           \
        -Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy            \
        -Wl,-u,$(SYMPREFIX)gui_init                             \
-       -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 afd905db40..434139ab5f 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"
@@ -702,8 +701,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]