[babl] babl: remove optional instrumentation
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl: remove optional instrumentation
- Date: Wed, 26 Jan 2022 07:00:10 +0000 (UTC)
commit d85b795b1e07888086ed5874318eee8b34cd7c90
Author: Øyvind Kolås <pippin gimp org>
Date: Wed Jan 26 04:43:30 2022 +0100
babl: remove optional instrumentation
babl/babl-fish-path.c | 12 ------------
tools/babl-benchmark.c | 5 +++--
2 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c
index 358e58861..c9c21516e 100644
--- a/babl/babl-fish-path.c
+++ b/babl/babl-fish-path.c
@@ -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);
diff --git a/tools/babl-benchmark.c b/tools/babl-benchmark.c
index be3a2ff9f..ee1df459e 100644
--- a/tools/babl-benchmark.c
+++ b/tools/babl-benchmark.c
@@ -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])))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]