1. 10 Mar, 2015 1 commit
    • Dmitry Kazakov's avatar
      Added KisAbstractProjectionPlane interface for Layer Styles and other modes · b85c89b4
      Dmitry Kazakov authored
      KisAbstarctProjectionPlane makes the abstractions of a merge'able entity.
      It regenerate() it when the entity is filthy, fetches need/change/accessRect()
      when needed and apply() the entity to the global projection finally.
      Now KisAsyncMerger and Kis*Walker use this interface only, instead of
      old-fasioned direct methods of KisNode/KisLayer.
      The general idea is:
      KisLayer uses all its internal framework to generate a projection()
      device. The user sets a layer style on a layer by setting a special
      projectionPlane() interface, which wraps this generated prejection()
      data into Layer Styles.
  2. 12 Feb, 2015 1 commit
    • Dmitry Kazakov's avatar
      Fixed multiple transform masks problems · 191011d3
      Dmitry Kazakov authored
      This patch implements:
      1) KisImage::requestProjectionUpdateNoFilthy() the same as layer->setDirty(),
         but skips regeneration of layer's projection.
      2) KisLayer::updateProjection() now accepts not layer's position, but
         a pointer to the filthy node.
      3) KisEffectMask::decorateRect() now accepts a position relative to the
         filthy mask/layer calculated inside the layer itself. *Not* the one used
         by KisAsyncMerger.
      Known bugs: tested only with affine transformations, that is Free and
                  4-point perspective
  3. 10 Dec, 2014 1 commit
  4. 07 Dec, 2014 1 commit
  5. 13 Nov, 2014 1 commit
    • Dmitry Kazakov's avatar
      Fixed dynamical updates of the Transform Mask · 4195c38e
      Dmitry Kazakov authored
      This patch implements numerous fixes and refactoings:
      1) Implemented KisSafeTransform. It works like a usual QTransform but
         it takes maths into account. That is the transform and its reverse
         are *not* defined on the entire R^2 plane. Instead the valid input
         area is limited by the horizon line and nothing can be transformed
         above it. KisSafeTransform takes that into account and clips the
         desired rect/polygon to fit the valid area.
      2) KisTransformMask::need/changeRect now uses safe trasnforms.
      3) KisAsyncMerger recalculates the area of the clone's source to fetch
         correct data. To fix concurrency, this extra area is taken into account
         in KisCloneLayer::accessRect();
      4) Implemented detailed unittests for dynamicat transform masks.
      5) Added ability to store reference images of the unittest in a
         separate folder (outside repository).
         It consists of 3 major parts:
         1) checkQImageExternal() is expected to be used to fetch data from
            external folders only.
         2) KRITA_UNITTESTS_DATA_DIR environment variable is used to search for
            additional data sources
            to a path will write the output of the unittest as a reference to
            an external folder.
      6) The testing images are stored in:
  6. 31 Oct, 2014 1 commit
  7. 27 Oct, 2014 1 commit
    • Dmitry Kazakov's avatar
      First ready-for-testing version of the Transform Mask functionality · 18db77f3
      Dmitry Kazakov authored
      1) Just create a Transform Mask and edit it with usual Transform Tool
      2) All the transformation modes are supported.
      2.1) Affine transforms (Free and Perspective) have dynamic preview. That
           is you can paint on a layer and the mask will be updated dynamically
      2.1) The other types are updated "statically", that is after 3 sec after
           the last change in the original layer.
      Question for testers: isn't this 3 sec delay too long? Probably we should
                            make it shorter?
      3) The transformation is written into the mask after you click Apply button.
      4) The quality of the affine preview and the final transform (after 3 sec
         delay) differs a bit. That is expected.
      5) You can also apply a transform mask onto a Clone Layer, which will
         allow you painting in 3D-perspective dynamically.
      Please test it in krita-chili-kazakov branch :)
  8. 23 Oct, 2014 1 commit
  9. 10 Nov, 2013 2 commits
  10. 21 Apr, 2013 1 commit
    • Dmitry Kazakov's avatar
      Fixed two bugs in filters/histogram code · 048c141f
      Dmitry Kazakov authored
      1) Histogram should not crash when the source device is empty
      2) The preview (and histogram) devices for an adjustment layer
         should be created not from the previous layer, but from the
         layers stack below.
  11. 01 Nov, 2012 1 commit
    • Dmitry Kazakov's avatar
      Fixed a bug in storing the filter configuration in filter-based layers · 65fe02e5
      Dmitry Kazakov authored
      The storage of the filter configuration in now implemented in
      KisNodeFilterInterface and is done by means of external shared pointers
      (QSharedPointer). This makes the use of this configuration thread safe.
      This patch also fixes various memory leaks in
      KisLayerManager and KisMaskManager.
  12. 25 Sep, 2012 1 commit
    • Boudewijn Rempt's avatar
      Force use of const colorspace and profile pointers · d315c710
      Boudewijn Rempt authored
      This removes the usage of grabColorspace/releaseColorspace from Krita.
      The option to get a non-const colorspace existed to get a non-const
      profile, on which the current exposure could be set. That changed with
      the move to lcms-based hdr colorspaces, so it's no longer necessary.
  13. 19 Feb, 2012 1 commit
  14. 05 Feb, 2012 1 commit
    • Dmitry Kazakov's avatar
      Fixed a really tricky bug in walkers · 5ea31706
      Dmitry Kazakov authored
      He-he ;)
      It happened due to the following:
      1) Undo of removeLayer command added a layer and issued setDirty
         for this node
      2) The scheduler calculated the walker for this update and put it
         into the queue
      3) Undo of addLayer command removed one of the layers of the stack,
         leaving the queued walker in a very interesting state.
      The point is that the walker stored a shared pointer to the removed
      node, so it still had access to it and there were no crashes, but its
      behavior was not obvious (read "unpredictable").
      So I extended the meaning of the walker's checksum. Now it depends on
      the graph sequence number as well, so the walker is recalculated when
      he gets to know its data is outdated.
      About Graph Sequence Number.
      Now KisNodeGraphListener maintains an integer which shows current "version"
      of the graph or its "sequence number". This integer is incremented on every
      change made to the graph. So if you have some information about the graph
      which was acquired while the sequence number was X and now you see the number
      equals to Y, you should know your information is outdated and someone has
      changed the graph since then.
  15. 14 Jan, 2012 1 commit
    • Dmitry Kazakov's avatar
      Partly fix preview of some filter · 6a85ac08
      Dmitry Kazakov authored
      The temporary device should have a transaction. If we do not create
      a temporary device (which means src==dst), then this is a caller's
      responsibility to create a transaction (this behavior is disputable).
      Still, some filters have wrong preview, because they expect the whole
      image to process
  16. 04 Jan, 2012 1 commit
  17. 06 Nov, 2011 2 commits
    • Dmitry Kazakov's avatar
      Fixed updates of clones · 0bb48aac
      Dmitry Kazakov authored
      1) The KisBaseRectsWalker now saves notifications for the clones.
         It does this by calculating uncropped changeRect of the source
         layer and storing the node/rect pairs in a special array.
      2) KisAsyncMerger takes the contents of this array and notifies the
         clones after the source layer's update is finished
      3) If clone needs an area of the source layer that was not generated
         during normal update (it is placed outside the image), it calculates
         its contents in KisUpdateOriginalVisitor by recursively calling to
    • Dmitry Kazakov's avatar
      Split KisAsyncMerger into two files: cpp+h · 5e21afd8
      Dmitry Kazakov authored
      That is needed to solve cyclic dependency: