Commit 69f91f70 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Make KisSafeNodeProjectionStore actually reuse the projection

Without any image present, the store will just drop the
projection without any reusing. It may cause small slowdowns
in the beginning of the stroke and (theoretically) memory
fragmentation on Windows.

I'm not sure if it actually the reason of the 408133, so we
need a confirmation from the reporter first.

parent 3dc58200
......@@ -200,6 +200,7 @@ KisLayer::KisLayer(KisImageWSP image, const QString &name, quint8 opacity)
m_d->metaDataStore = new KisMetaData::Store();
m_d->projectionPlane = toQShared(new KisLayerProjectionPlane(this));
m_d->safeProjection = new KisSafeNodeProjectionStore();
KisLayer::KisLayer(const KisLayer& rhs)
......@@ -213,6 +214,7 @@ KisLayer::KisLayer(const KisLayer& rhs)
m_d->projectionPlane = toQShared(new KisLayerProjectionPlane(this));
m_d->safeProjection = new KisSafeNodeProjectionStore(*rhs.m_d->safeProjection);
if (rhs.m_d->layerStyle) {
m_d->layerStyle = rhs.m_d->layerStyle->clone();
......@@ -79,6 +79,7 @@ KisMask::KisMask(const QString & name)
m_d->safeProjection = new KisSafeSelectionNodeProjectionStore();
KisMask::KisMask(const KisMask& rhs)
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