Don't convert colors if color management is disabled (#1576)

This commit is contained in:
David Capello 2018-10-23 16:15:31 -03:00
parent ccae016878
commit 6ca0ecf193

View File

@ -54,16 +54,20 @@ gfx::ColorSpacePtr get_working_rgb_space_from_preferences()
ConvertCS::ConvertCS()
{
auto srcCS = get_current_color_space();
auto dstCS = get_screen_color_space();
if (srcCS && dstCS)
m_conversion = os::instance()->convertBetweenColorSpace(srcCS, dstCS);
if (Preferences::instance().color.manage()) {
auto srcCS = get_current_color_space();
auto dstCS = get_screen_color_space();
if (srcCS && dstCS)
m_conversion = os::instance()->convertBetweenColorSpace(srcCS, dstCS);
}
}
ConvertCS::ConvertCS(const os::ColorSpacePtr& srcCS,
const os::ColorSpacePtr& dstCS)
{
m_conversion = os::instance()->convertBetweenColorSpace(srcCS, dstCS);
if (Preferences::instance().color.manage()) {
m_conversion = os::instance()->convertBetweenColorSpace(srcCS, dstCS);
}
}
ConvertCS::ConvertCS(ConvertCS&& that)