Commit 387e549d authored by Cyrille Berger's avatar Cyrille Berger

* in convertPixelsTo, if the color space are equal, then copy the content...

* in convertPixelsTo, if the color space are equal, then copy the content (give a boost to gradients)
* select the headers that can be installed

svn path=/trunk/koffice/; revision=759491
parent df1bf2e8
......@@ -61,6 +61,21 @@ set_target_properties(pigmentcms PROPERTIES VERSION 1.0.0 SOVERSION 1 )
install(TARGETS pigmentcms DESTINATION ${LIB_INSTALL_DIR})
install( FILES KoColorSpaceRegistry.h KoChannelInfo.h KoColor.h KoColorSpace.h KoCompositeOp.h KoColorProfile.h KoBasicHistogramProducers.h KoBasicHistogramProducers.h DESTINATION ${INCLUDE_INSTALL_DIR})
install( FILES
KoBasicHistogramProducers.h
KoChannelInfo.h
KoColor.h
KoColorConversionTransformation.h
KoColorConversionTransformationFactory.h
KoColorModelStandardIds.h
KoColorProfile.h
KoColorSpace.h
KoColorSpaceRegistry.h
KoColorTransformationFactory.h
KoColorTransformationFactoryRegistry.h
KoCompositeOp.h
KoHistogramProducer.h
DESTINATION ${INCLUDE_INSTALL_DIR})
install( FILES pigment.desktop pigmentextension.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
......@@ -246,8 +246,13 @@ bool KoColorSpace::convertPixelsTo(const quint8 * src,
quint32 numPixels,
KoColorConversionTransformation::Intent renderingIntent) const
{
KoCachedColorConversionTransformation cct = KoColorSpaceRegistry::instance()->colorConversionCache()->cachedConverter(this, dstColorSpace, renderingIntent);
cct.transformation()->transform(src, dst, numPixels);
if( *this == *dstColorSpace)
{
memcpy( dst, src, numPixels * sizeof(quint8) * pixelSize());
} else {
KoCachedColorConversionTransformation cct = KoColorSpaceRegistry::instance()->colorConversionCache()->cachedConverter(this, dstColorSpace, renderingIntent);
cct.transformation()->transform(src, dst, numPixels);
}
return true;
}
......@@ -307,7 +312,6 @@ void KoColorSpace::bitBlt(quint8 *dst,
const KoCompositeOp * op,
const QBitArray & channelFlags) const
{
kDebug(DBG_PIGMENT) << "Composite op is for color space " << op->colorSpace()->id() << " and this is " << id();
Q_ASSERT_X(*op->colorSpace() == *this, "KoColorSpace::bitBlt", QString("Composite op is for color space %1 while this is %2" ).arg( op->colorSpace()->id() ).arg(id()).toLatin1() );
if (rows <= 0 || cols <= 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment