1. 25 Sep, 2015 1 commit
  2. 04 Sep, 2015 1 commit
    • Boudewijn Rempt's avatar
      Port away from kdebug to qcdebug · 4fa86a75
      Boudewijn Rempt authored
      The approach taken is a bit different from what's in the porting
      scripts or in pigment: I've moved kis_debug to libglobal and adapted
      the dbgKrita etc. defines to use qcDebug etc. I've kept the old
      category numbers for now. I've also ported all places where we
      used kDebug() etc. directly, and not a few places where qDebug() etc
      were used directly.
  3. 18 Jun, 2015 3 commits
    • Dmitry Kazakov's avatar
    • Dmitry Kazakov's avatar
      Make painting below Adjustment Layers up to 10 times faster! :) · 4319cea3
      Dmitry Kazakov authored
      We used to spend a lot of time on creation and update of progress
      reporters. Now we use a specially factored class KisBusyProgressIndicator
      that just shows a progress bar for 200ms and hides it if no further updates
      happened. Usage of atomic integers allows us avoid expensive synchronisations
      between threads.
      So now painting below Adjustment layers is significantly faster!
    • Dmitry Kazakov's avatar
      Fix Adjustment layers composition · 7667b4e7
      Dmitry Kazakov authored
      This was a very old bug related the way how selection is applied
      to adjustment layers. Now selection defines not "how the filtered
      data is blended into the image" but "how the filter effect is applied
      to the composed image". In the result, erasing the selection now will
      *not* make your image fully transparent, but just removes the filter
      effect from that area.
  4. 12 May, 2015 1 commit
    • Dmitry Kazakov's avatar
      Implement initial KisProjectionLeaf interface · 946bf224
      Dmitry Kazakov authored
      KisProjectionLeaf is a special interface of KisNode that provides a
      separate image graph for rendering. This interface is use by all walkers
      and by async merger. The rest of Krita uses the basic one.
  5. 29 Apr, 2015 1 commit
    • Dmitry Kazakov's avatar
      [NEED TESTING FROM USERS!] A HUGE optimization for the merger framework · fda4a0d5
      Dmitry Kazakov authored
      Now the merger deals much more carefully with the layer's extent and
      doesn't write data if the area in question is empty! That is really
      important when working with transformation and transparency masks.
      What needs to be tested really thoroughly:
      1) Using Move Tool
      * on usual layers
      * on group layers
      * on layers with transparency masks
      * on layers with transformation masks
      2) Updates when using Transformation Masks
      3) Updates when using Transparency Masks
  6. 18 Mar, 2015 1 commit
    • Lukáš Tvrdý's avatar
      Fix PVS Studio warning · e7457266
      Lukáš Tvrdý authored
      V808 'applyRects' object of 'QStack' type was created but was not utilized. kis_async_merger.cpp 154
  7. 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.
  8. 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
  9. 10 Dec, 2014 1 commit
  10. 07 Dec, 2014 1 commit
  11. 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:
  12. 31 Oct, 2014 1 commit
  13. 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 :)
  14. 23 Oct, 2014 1 commit
  15. 10 Nov, 2013 2 commits
  16. 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.
  17. 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.
  18. 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.
  19. 19 Feb, 2012 1 commit
  20. 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.
  21. 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
  22. 04 Jan, 2012 1 commit
  23. 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: