Failing unittests

Boudewijn Rempt boud at valdyas.org
Sat Sep 22 10:47:20 CEST 2007


On Friday 21 September 2007, Cyrille Berger wrote:

> Outch this is a bad one. Not sure, yet, about the best way to fix that.
>
> Lets me explain, if you look at the code this ASSERT _can't_ fail (and yet
> it does :( ), only a KoLcmsColorSpace creates a
> KoLcmsColorConversionTransformation, and it allways gives himself as
> argument to the source colorspace, which means "srcColorSpace()" is allways
> a KoLcmsColorSpace, and allways inherits KoLcmsInfo, and so is allways
> castable to KoLcmsInfo.
>
> But still the assert fails. I have a possible explanation for that,
> KoLcmsColorSpace is a template class, that means that while the source code
> is in pigment, the binary code is wherever the class is instantiate, that
> means in the colorspace plugins. And the problem is that RTTI doesn't work
> well when used with dlopen.
>
> I see a couple of solutions, but none please me,
> - add a KoColorSpaceInfo class and add a function in KoColorSpace to return
> a KoColorSpaceInfo that could be inherited by KoColorSpaceLcmsInfo, as it
> wouldn't be templated, the symbols would be available in pigment library
> and there should be no RTTI problem

My intuition says that this would be the way to go, for now.

> There might be a cleaner solution with the new system for color conversion,
> but it's not very clear in my mind, and I was hopping to shortcut the new
> system when converting color between two LCMS colorspace, but it might not
> be that possible :/

Shortcuts could be pretty important for performance reasons.

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20070922/fba378bd/attachment.pgp 


More information about the kimageshop mailing list