babl: remove optional instrumentation
authorØyvind Kolås <pippin@gimp.org>
Wed, 26 Jan 2022 03:43:30 +0000 (04:43 +0100)
committerØyvind Kolås <pippin@gimp.org>
Wed, 26 Jan 2022 06:00:11 +0000 (07:00 +0100)
babl/babl-fish-path.c
tools/babl-benchmark.c

index 358e5886178daa16af2c4e70530241249e17eda7..c9c21516ec4ff7c507cf34e63a44c4a250954099 100644 (file)
@@ -32,7 +32,6 @@
 #define MIN(a, b) (((a) > (b)) ? (b) : (a))
 #endif
 
-
 typedef struct GcContext {
    long time;
 } GcContext;
@@ -462,7 +461,6 @@ _babl_fish_create_name (char       *buf,
 static int max_path_length (void);
 
 static int debug_conversions = 0;
-int _babl_instrument = 0;
 
 double
 _babl_legal_error (void)
@@ -485,12 +483,6 @@ _babl_legal_error (void)
   else
     debug_conversions = 0;
 
-  env = getenv ("BABL_INSTRUMENT");
-  if (env && env[0] != '\0')
-    _babl_instrument = 1;
-  else
-    _babl_instrument = 0;
-
   return error;
 }
 
@@ -1219,8 +1211,6 @@ _babl_process (const Babl *cbabl,
 {
   Babl *babl = (void*)cbabl;
   babl->fish.dispatch (babl, source, destination, n, *babl->fish.data);
-  if (_babl_instrument)
-    babl->fish.pixels += n;
   return n;
 }
 
@@ -1252,8 +1242,6 @@ babl_process_rows (const Babl *fish,
   if (n <= 0)
     return 0;
 
-  if (_babl_instrument)
-    babl->fish.pixels += n * rows;
   for (row = 0; row < rows; row++)
     {
       babl->fish.dispatch (babl, (void*)src, (void*)dst, n, *babl->fish.data);
index be3a2ff9f63756f62f6a64aeac8a2c95ca36ea24..ee1df459ee716c5fab68203370b8e23e7175897a 100644 (file)
@@ -64,6 +64,8 @@ unicode_hbar (int    width,
   return ret;
 }
 
+int show_details = 0;
+
 static int
 test (int set_no)
 {
@@ -80,7 +82,6 @@ test (int set_no)
        babl_format_with_space("RGBA float", babl_space(space)), \
        babl_format_with_space("RaGaBaA float", babl_space(space)), \
        babl_format_with_space("R'G'B'A float", babl_space(space)), \
-       babl_format_with_space("R'G'B'A float", babl_space(out_space)),  \
        babl_format_with_space("R'G'B'A u8", babl_space(out_space)) 
 
   const Babl **formats=NULL;
@@ -199,7 +200,6 @@ test (int set_no)
   double mbps[50 * 50] = {0,};
   long n;
 
-  int show_details = 0;
   int set_iter = 0;
   int first_run = 1;
   float max_throughput = 0;
@@ -339,6 +339,7 @@ main (int    argc,
 {
   //if (argv[1]) ITERATIONS = atoi (argv[1]);
   babl_init ();
+  if (argv[1] && argv[2]) show_details = 1;
   if (argv[1])
   {
     if (test (atoi(argv[1])))