Krita Colorspace and profiles
Stefano Bonicatti
smjert at gmail.com
Sun Mar 27 20:17:24 UTC 2016
> Yes, that should be possible. For instance, there are buttons for adding
new profiles from disk during runtime.
Ok, that make sense, then there's an unwritten assumption that a new
profile won't be added at the same time as a colorspace get requested, or
that a colorspace that wanted to use that profile won't never be requested
before that profile is actually added to the list (it might sound silly to
think otherwise, why asking for something that you know that doesn't
exists, especially since the profile is added by a human, not by a result
of some side effect of some action. Still being sure of the exact
functionality that's requested from a certain class, and document it, it's
vital).
A last thing i noticed it's that the function always tries to search for
the colorspace using a profile name that might be an alias (if the profile
name is actually passed to the function), but there is no colorspace (as
far as i can see) that is stored using an alias profile name as it's key.
So lets say that the cache is empty and the first colorspace gets requested
with an alias profile name, the first thing is a cache miss.. after a cache
miss the alias and the original profile name will be used to search the
actual profile pointer in various places, but in the end what it will be
used as a part of the key, is the "original" profile name, not the alias..
So this is an optimization, but i really think that the first thing the
code should do is to "translate" the alias to the original profile name,
and only then try to hit the cache.
I will check this better and then show something on a differential.
2016-03-26 15:41 GMT+01:00 Boudewijn Rempt <boud at valdyas.org>:
> On Fri, 25 Mar 2016, Stefano Bonicatti wrote:
>
> > [...] it's not a mess because we're too stupid to do it right: it's
>> grown into a tangle because it contains years of bug fixes.
>>
>> I don't think you're stupid, i just think that when i see a tangle, i
>> want to disentagle that as a first thing, before anything else,
>> before stuff gets built on it that then needs to be changed as well,
>> complicating a lot more the task.
>> Those issues together with other are all very dangerous time bombs.
>>
>> That been said, i still didn't understand if it's correct that color
>> profiles can be created and added to the colorspace registry after
>> the startup or not (because this is happening now already).
>>
>
> Yes, that should be possible. For instance, there are buttons for adding
> new profiles from disk during runtime.
>
>
> --
> Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org
> _______________________________________________
> Krita mailing list
> kimageshop at kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20160327/a8f61841/attachment.html>
More information about the kimageshop
mailing list