babl: skip initial profiling for planar conversions
authorØyvind Kolås <pippin@gimp.org>
Wed, 29 Aug 2018 13:27:08 +0000 (15:27 +0200)
committerØyvind Kolås <pippin@gimp.org>
Wed, 29 Aug 2018 13:27:08 +0000 (15:27 +0200)
babl/babl-conversion.c

index 136d91f87159d627547f46cb003fcf0e87475e47..1127c003b87cf865b9dad196d4b4343251a1ec77 100644 (file)
@@ -493,10 +493,19 @@ babl_conversion_error (BablConversion *conversion)
   babl_process (fish_rgba_to_source,
                 test, source, test_pixels);
 
-  ticks_start = babl_ticks ();
-  babl_process (babl_fish_simple (conversion),
-                source, destination, test_pixels);
-  ticks_end = babl_ticks ();
+  if (BABL(conversion)->class_type == BABL_CONVERSION_LINEAR)
+  {
+    ticks_start = babl_ticks ();
+    babl_process (babl_fish_simple (conversion),
+                  source, destination, test_pixels);
+    ticks_end = babl_ticks ();
+  }
+  else
+  {
+    /* we could still measure it, but for the paths we only really consider
+     * the linear ones anyways */
+    ticks_end = 1000;
+  }
 
   babl_process (fish_reference,
                 source, ref_destination, test_pixels);