Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 9ae336ed authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Cache the color space engine to make it faster

It doesn't fix everything, but it fixes quite a bit.
Ref T210
parent d4358901
......@@ -67,6 +67,7 @@ KoColorSpace::KoColorSpace(const QString &id, const QString &name, KoMixColorsOp
d->TRCXYY = QPolygonF();
d->colorants = QVector <qreal> (0);
d->lumaCoefficients = QVector <qreal> (0);
d->iccEngine = 0;
d->deletability = NotOwnedByRegistry;
......@@ -451,10 +452,12 @@ bool KoColorSpace::proofPixelsTo(const quint8 * src,
// Only the icc engine can do this kind of stuff
//Can we cache this, maybe???
KoColorSpaceEngine *engine = KoColorSpaceEngineRegistry::instance()->get("icc");
if (d->iccEngine) {
d->iccEngine = KoColorSpaceEngineRegistry::instance()->get("icc");
//qDebug() << ">>>>>>>>>>>>>>>>>>>> we got a proofing engine";
if (!engine) return false;
KoColorConversionTransformation *transform = engine->createColorProofingTransformation(this, dstColorSpace, proofingSpace, renderingIntent, conversionFlags);
if (!d->iccEngine) return false;
KoColorConversionTransformation *transform = d->iccEngine->createColorProofingTransformation(this, dstColorSpace, proofingSpace, renderingIntent, conversionFlags);
......@@ -21,6 +21,7 @@
#include "KoColorSpace.h"
#include "KoColorSpaceEngine.h"
#include <QThreadStorage>
#include <QPolygonF>
......@@ -45,6 +46,8 @@ struct Q_DECL_HIDDEN KoColorSpace::Private {
QVector <qreal> colorants;
QVector <qreal> lumaCoefficients;
KoColorSpaceEngine *iccEngine;
Deletability deletability;
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