[gimp] app: pre-initialize some babl fishes
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: pre-initialize some babl fishes
- Date: Thu, 10 Nov 2016 23:54:19 +0000 (UTC)
commit 99b9a60e8be1fb3ef3aab0f1f55238373c16d6db
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Nov 11 00:53:48 2016 +0100
app: pre-initialize some babl fishes
app/gegl/gimp-babl.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/app/gegl/gimp-babl.c b/app/gegl/gimp-babl.c
index 8c8c11b..7dbc486 100644
--- a/app/gegl/gimp-babl.c
+++ b/app/gegl/gimp-babl.c
@@ -251,6 +251,29 @@ gimp_babl_init (void)
babl_type ("double"),
babl_component ("A"),
NULL);
+
+ /* create a bunch of fishes - to decrease the initial lazy intialization cost
+ for some interactions
+ */
+ babl_fish (babl_format("Y' u8"), babl_format("RaGaBaA float"));
+ babl_fish (babl_format("Y u8"), babl_format("RaGaBaA float"));
+ babl_fish (babl_format("R'G'B'A u8"), babl_format("RaGaBaA float"));
+ babl_fish (babl_format("R'G'B'A float"), babl_format("R'G'B'A u8"));
+ babl_fish (babl_format("R'G'B'A float"), babl_format("R'G'B' u8"));
+ babl_fish (babl_format("R'G'B'A u8"), babl_format("RGBA float"));
+ babl_fish (babl_format("RGBA float"), babl_format("R'G'B'A u8"));
+ babl_fish (babl_format("RGBA float"), babl_format("R'G'B'A u8"));
+ babl_fish (babl_format("RGBA float"), babl_format("R'G'B'A float"));
+ babl_fish (babl_format("Y' u8"), babl_format("R'G'B' u8"));
+ babl_fish (babl_format("Y u8"), babl_format("Y float"));
+ babl_fish (babl_format("R'G'B' u8"), babl_format("cairo-RGB24"));
+ babl_fish (babl_format("R'G'B' u8"), babl_format("R'G'B'A float"));
+ babl_fish (babl_format("R'G'B' u8"), babl_format("R'G'B'A u8"));
+ babl_fish (babl_format("R'G'B'A u8"), babl_format("R'G'B'A float"));
+ babl_fish (babl_format("R'G'B'A u8"), babl_format("cairo-ARGB32"));
+ babl_fish (babl_format("R'G'B'A double"), babl_format("RGBA float"));
+ babl_fish (babl_format("R'G'B'A float"), babl_format("RGBA double"));
+
}
static const struct
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]