[babl] ctx: factor lut processing out of path_process
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] ctx: factor lut processing out of path_process
- Date: Mon, 24 Jan 2022 06:25:47 +0000 (UTC)
commit 8a5c593af3b01e26a48e7d4e88d1d0104a12fcb1
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Jan 24 07:01:12 2022 +0100
ctx: factor lut processing out of path_process
babl/babl-fish-path.c | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
---
diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c
index 422e9f460..f709c3fd1 100644
--- a/babl/babl-fish-path.c
+++ b/babl/babl-fish-path.c
@@ -756,15 +756,12 @@ babl_gc_fishes (void)
// is responsibility of higher layers
}
-static void
-babl_fish_path_process (const Babl *babl,
- const char *source,
- char *destination,
- long n,
- void *data)
+static int babl_fish_lut_process_maybe (const Babl *babl,
+ const char *source,
+ const char *destination,
+ long n,
+ void *data)
{
- if (babl->fish_path.is_u8_color_conv)
- {
uint32_t *lut = (uint32_t*)babl->fish_path.u8_lut;
((Babl*)babl)->fish.pixels += n;
@@ -867,8 +864,26 @@ babl_fish_path_process (const Babl *babl,
}
}
BABL(babl)->fish_path.last_lut_use = babl_ticks ();
- return;
+ return 1;
}
+ return 0;
+}
+
+static void
+babl_fish_path_process (const Babl *babl,
+ const char *source,
+ char *destination,
+ long n,
+ void *data)
+{
+ if (babl->fish_path.is_u8_color_conv)
+ {
+ if (babl_fish_lut_process_maybe (babl,
+ source,
+ destination,
+ n,
+ data))
+ return;
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]