babl r275 - in trunk: . babl



Author: ok
Date: Sun Jan 20 22:26:08 2008
New Revision: 275
URL: http://svn.gnome.org/viewvc/babl?rev=275&view=rev

Log:
Always use BablFishPath's for accepted conversions. The path
construction code is the location of the regression test, an
earlier (now unneeded) optimization allowed using the first
and best conversion available. The (not in bugzilla afair) bug
manifest by this depended on the order of .so's on the file system
to manifest itself.
* babl/babl-fish.c: (go_fishing): only accepts paths when we go
fishing for existing conversions.
(babl_fish): elaborated a comment about why we avoid shortcut
conversions and only paths.


Modified:
   trunk/ChangeLog
   trunk/babl/babl-fish.c

Modified: trunk/babl/babl-fish.c
==============================================================================
--- trunk/babl/babl-fish.c	(original)
+++ trunk/babl/babl-fish.c	Sun Jan 20 22:26:08 2008
@@ -67,8 +67,8 @@
       Babl *item = db->items[i];
       if ((void *) source == (void *) item->fish.source &&
           (void *) destination == (void *) item->fish.destination &&
-          (item->class_type != BABL_FISH_REFERENCE ||
-           source == destination)
+          (item->class_type == BABL_FISH_PATH || /* accept only paths */
+           source == destination)                /* or memcpy */
           )
         {
           return item;
@@ -128,7 +128,9 @@
   }
 
   if (0) /* do not accept shortcut conversions, since there might be
-            a faster path
+            a faster path, besides the shortcut conversion might
+            have a too large error, let's rely on the paths for
+            error checking.
           */
     {
       Babl *shortcut_conversion;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]