--===============9219358469130012194== Content-Type: multipart/alternative; boundary=001a11c3560cc663e2050aca6e44 --001a11c3560cc663e2050aca6e44 Content-Type: text/plain; charset=UTF-8 On Sun, Dec 21, 2014 at 6:27 PM, Boudewijn Rempt wrote: But don't think in terms of 'the image' -- if the timeline is outside > KisImage, we'd generate a KisImage for every frame, with references to the > nodes used in the timeline. > A separate KisImage for every frame is a nice idea, but we need to answer two questions: 1) How would we handle static layers? Are they going to be duplicated in every frame? Right now all the types of layers store a pointer to the image (KisDefaultBounds in every KisNode + a direct pointer in every KisLayer). Also clone layers have a bidirectional link with its source, which is used for projection calculation every time. Every paint device inside a layer also stores a pointer to KisImage via KisDefaultBounds. These pointers were the reason why I decided to implement LOD by switching datamanagers inside a paint device, instead of switching paint devices in layers. 2) Memory management. All the duplicated node will occupy extra memory. Krita's tile engine has copy-on-write mechanism, but it works only on direct copies of paint devices. If we save the duplicated nodes into .kra and load them afterwards, the memory will be duplicated. --- Dmitry Kazakov --001a11c3560cc663e2050aca6e44 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Sun, Dec 21, 2014 at 6:27 PM, Boudewijn Rempt <= boud@valdyas.org&= gt; wrote:

= But don't think in terms of 'the image' -- if the timeline is o= utside KisImage, we'd generate a KisImage for every frame, with referen= ces to the nodes used in the timeline.

A separate KisImage for ever= y frame is a nice idea, but we need to answer two questions:

<= div class=3D"gmail_extra">1) How would we handle static layers? Are they go= ing to be duplicated in every frame? Right now all the types of layers stor= e a pointer to the image (KisDefaultBounds in every KisNode + a direct poin= ter in every KisLayer). Also clone layers have a bidirectional link with it= s source, which is used for projection calculation every time. Every paint = device inside a layer also stores a pointer to KisImage via KisDefaultBound= s.

These pointers were the reason why I decided to implement LOD by= switching datamanagers inside a paint device, instead of switching paint d= evices in layers.

2) Memory managem= ent. All the duplicated node will occupy extra memory. Krita's tile eng= ine has copy-on-write mechanism, but it works only on direct copies of pain= t devices. If we save the duplicated nodes into .kra and load them afterwar= ds, the memory will be duplicated.

=

---
Dmitry Kazakov
--001a11c3560cc663e2050aca6e44-- --===============9219358469130012194== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Krita mailing list kimageshop@kde.org https://mail.kde.org/mailman/listinfo/kimageshop --===============9219358469130012194==--