[gimp/gimp-2-10] app: add tile-alloc-total variable to the dashboard



commit 89495f457d31421687a1bee870c7bfa61e6d56e7
Author: Ell <ell_se yahoo com>
Date:   Wed May 8 04:15:47 2019 -0400

    app: add tile-alloc-total variable to the dashboard
    
    Add a tile-alloc-total varaible to the dashboard's memory and misc
    groups, showing the total amount of memory used by the tile
    allocator (see commit
    gegl@137e66e45138e8316f6403e53e8aa9a02ad523e7.)
    
    (cherry picked from commit cf54f790fd8da952844e77e0cbcb0e589dd6bbac)

 app/widgets/gimpdashboard.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
---
diff --git a/app/widgets/gimpdashboard.c b/app/widgets/gimpdashboard.c
index a4e00b15f6..0d63386fbe 100644
--- a/app/widgets/gimpdashboard.c
+++ b/app/widgets/gimpdashboard.c
@@ -139,6 +139,7 @@ typedef enum
   /* misc */
   VARIABLE_MIPMAPED,
   VARIABLE_ASYNC_RUNNING,
+  VARIABLE_TILE_ALLOC_TOTAL,
   VARIABLE_SCRATCH_TOTAL,
   VARIABLE_TEMP_BUF_TOTAL,
 
@@ -698,6 +699,16 @@ static const VariableInfo variables[] =
     .data             = gimp_async_get_n_running
   },
 
+  [VARIABLE_TILE_ALLOC_TOTAL] =
+  { .name             = "tile-alloc-total",
+    .title            = NC_("dashboard-variable", "Tile"),
+    .description      = N_("Total size of tile memory"),
+    .type             = VARIABLE_TYPE_SIZE,
+    .color            = {0.3, 0.3, 1.0, 1.0},
+    .sample_func      = gimp_dashboard_sample_gegl_stats,
+    .data             = "tile-alloc-total"
+  },
+
   [VARIABLE_SCRATCH_TOTAL] =
   { .name             = "scratch-total",
     .title            = NC_("dashboard-variable", "Scratch"),
@@ -873,6 +884,10 @@ static const GroupInfo groups[] =
                         {
                           { .variable         = VARIABLE_CACHE_OCCUPIED,
                             .title            = NC_("dashboard-variable", "Cache"),
+                            .default_active   = FALSE,
+                            .meter_value      = 4
+                          },
+                          { .variable         = VARIABLE_TILE_ALLOC_TOTAL,
                             .default_active   = FALSE,
                             .meter_value      = 3
                           },
@@ -915,6 +930,9 @@ static const GroupInfo groups[] =
                           { .variable       = VARIABLE_ASYNC_RUNNING,
                             .default_active = TRUE
                           },
+                          { .variable       = VARIABLE_TILE_ALLOC_TOTAL,
+                            .default_active = TRUE
+                          },
                           { .variable       = VARIABLE_SCRATCH_TOTAL,
                             .default_active = TRUE
                           },


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