diff options
author | Øyvind Kolås <ok@src.gnome.org> | 2008-01-20 22:26:08 +0000 |
---|---|---|
committer | Øyvind Kolås <ok@src.gnome.org> | 2008-01-20 22:26:08 +0000 |
commit | 19e5c222b823de00b37b6435a16eb65f220398f5 (patch) | |
tree | ccb1b643d5fa4f5f294a15b850478d11568761d9 /babl/babl-fish.c | |
parent | 0832cdb633ded7759392ccbacad545996c5de1c8 (diff) |
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.
svn path=/trunk/; revision=275
Diffstat (limited to 'babl/babl-fish.c')
-rw-r--r-- | babl/babl-fish.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/babl/babl-fish.c b/babl/babl-fish.c index 7976912..d0c148f 100644 --- a/babl/babl-fish.c +++ b/babl/babl-fish.c @@ -67,8 +67,8 @@ go_fishing (const Babl *source, 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 @@ babl_fish (const void *source, } 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; |