1. 09 Sep, 2019 3 commits
  2. 06 Sep, 2019 3 commits
    • Dmitry Kazakov's avatar
      Remove XCB library from the list of dependencies · ca902a45
      Dmitry Kazakov authored
      We don't use it anymore (all the tablet code has been merged back
      into Qt).
    • Dmitry Kazakov's avatar
      Fix crash after cropping a specific image · 0f9c5472
      Dmitry Kazakov authored
      This patch ends the era of the custom "empty extent" value
      QRect(quint32_MAX, quint32_MAX, 0, 0). When I started refactoring
      tile engine ten years ago in 2009, this "empty extent" flag was
      already present. It was just a result of the way how extent was
      calculated those days. I guess it was also considered as
      an "optimization", or as "a flag" that could ease debugging a bit
      (and it actually did help debugging a couple of times).
      Years passed by and I considered to remove this custom value multiple
      times. It was always causing troubles, because the QRect is not safe
      against integer oveflows. But the problem was, there was code outside
      tiles engine that relied on this behavior. So I was always scared of
      the actual removal. Even when the tile engine was rewritten again
      to become lockfree in 2017, I insisted on keeping the old behavior...
      So, it looks like now all code that relies on this custom value is gone,
      so it should be safe to remove it.
      Funny side, I guess it was one of few artifacts that were still kept
      in Krita since 'tiles' and 'tiles_new' days (has anyone ever wondered
      why the engine's folder is called 'tiles3'?) ;)
    • Dmitry Kazakov's avatar
      Remove unused code · 46cc3890
      Dmitry Kazakov authored
  3. 05 Sep, 2019 24 commits
    • Mathias Wein's avatar
      Don't return between QPainter save and restore · 5c326ec1
      Mathias Wein authored
      From Qt docs:
      "A save() must be followed by a corresponding restore();"
      So just move the conditional return up by one statement to avoid
      incorrect stack unwinding in KisPaletteDelegate.
    • Mathias Wein's avatar
      Add back reworked HDR handling to KisVisualColorSelector · 5d9725e3
      Mathias Wein authored
      The exposure is currently auto-compensated, that means your
      selectable dynamic range changes with exposure.
      Also, since it is now possible to tell linear from gamma-curve RGB
      profiles apart, gamma of 2.2 then gets applied by the selector to
      keep that visually even brightness distribution of instead of having
      lighter values dominate the selector space.
    • Mathias Wein's avatar
      Add isLinear() query function to KoColorProfile · f1f556e3
      Mathias Wein authored
      Returns true if a color profile has only linear transfer response curves.
      This implies that that it has transfer response curves.
      Hint: The abstract class IccColorProfile::Profile doesn't really seem
      to server any really purpose anymore (if it ever did), so I didn't touch
      its interface. It might be time to remove it and use non-virtual functions.
    • Mathias Wein's avatar
      Implement optimized renderBackground() for elliptical selector shape · 9dbde0d0
      Mathias Wein authored
      Uses a simple integer radius check to skip pixels outside the mask.
      Also do antialiased outline rendering here instead of redoing
      on every cursor movement.
    • Mathias Wein's avatar
      Break up KisVisualColorSelectorShape::getImageMap() · 0cb1e86e
      Mathias Wein authored
      - move rendering of the selector shape background into own function
        called renderBackground()
      - move conversion from KoColor data array to QImage to helper function
        called convertImageMap()
      This way it can be better specialized for optimizations.
    • Mathias Wein's avatar
      Move setMask() calls from paintEvent() to resizeEvent() · 3cf5530e
      Mathias Wein authored
      Mask doesn't change otherwise, and it might even be too late to
      apply it without some duplicate rendering.
      Also set border width before resize to not force double repaint for
      correct rendering, and don't mimic resize by forcing min/max values.
    • Mathias Wein's avatar
      Don't call this->show() in a constructor · 1132b6db
      Mathias Wein authored
      QWidget::show() triggers a resizeEvent() which is a virtual function
      call, which is a really bad idea...
      Instead, make the function that created (possibly) hidden widgets
      to show() them.
      Also, the update() on the children in a resize event was redundant.
    • Mathias Wein's avatar
      Don't set a minimum height in color selector dialog UI file. · b66c7e32
      Mathias Wein authored
      This makes the embedded layout of KisSpinboxColorSelector try real
      hard to squeeze the spinboxes and labels in this too small height,
      let it instead figure out a minimum height itself from its children.
    • Mathias Wein's avatar
      Finally realized why KisVisualRectangleShape behaves weird when non-square · 5f08e170
      Mathias Wein authored
      Some sneaky mix-up of width() and height() in one place caused it.
      This should fix the offset issue reported in Bug 381529
      (the rendering part is still needs more work).
    • Mathias Wein's avatar
      Flip y-coordinate in KisVisualRectangleShape · 8761be68
      Mathias Wein authored
      This is done to match the Advanced Color Selector.
    • Mathias Wein's avatar
      Big KisVisualColorSelector refactor, Part 2 (removing code) · 8d445606
      Mathias Wein authored
      Remove functions and attributes that were put in other classes or
      are no longer required.
      Also fix an oversight of possibly undefined "model" value.
    • Mathias Wein's avatar
      Big KisVisualColorSelector refactor, Part 1 (adding code) · a8958bc9
      Mathias Wein authored
      Basically, this makes KisVisualColorSelectorShape and subclasses as
      dumb as possible and let the selector itself decide how to handle stuff.
      The selector uses raw color model values as much as possible, this
      avoids a number of problems like jumpy handles and unnecessary re-rendering.
      - Move code for conversion between color and shape coordinates from
        shape to selector class, along with a number of required class attributes
      - Change mouse event handler to only care about the shape's handle position;
        Handles will now smoothly follow mouse, including movements outside the actual shape.
      - Only re-render the background image when the channels for it changed
      - Get rid of (failed) attempts to compress update signals;
        The selector really should be as smooth as possible IMO, signal compression
        is better done outside of the actual selector (as already done for the dialog)
      Note: HDR color ranges are currently not selectable, but it appears
      it was broken anyway, among some things in non-RGB color spaces that still
      need fixing as well.
    • Mathias Wein's avatar
      (coding style) make some function const · 5d550a12
      Mathias Wein authored
    • Mathias Wein's avatar
      Fix widget->shape coordinate conversion of ellipse shape · 963edf29
      Mathias Wein authored
      The shape coordinate of KisVisualEllipticalSelectorShape did
      not stay in 0-1 range for 360° angle component, which breaks later
      color conversions that don't just wrap around.
    • Mathias Wein's avatar
      Don't allocate a QImage that should be overwritten anyway · 98cfd438
      Mathias Wein authored
      Instead, create a black image in case the conversion failed.
      This currently happens in L*a*b color space at certain channel depths.
    • Mathias Wein's avatar
      Correct size of memory allocation · 11c8d745
      Mathias Wein authored
    • Mathias Wein's avatar
      Handle coordinates outside of rectangle selector shape · a1ea3e8a
      Mathias Wein authored
      This makes KisVisualRectangleSelectorShape handle mouse positions
      outside of its active area, so the color cursor can easily be moved
      to the edge or corner.
    • Mathias Wein's avatar
      Some signaling improvements in KisDlgInternalColorSelector: · dad2d742
      Mathias Wein authored
      - actually use the signal compressor to prevent excessive updating,
        so emit the signals in the slot for timeout()
      - slotLockSelector() was just an obfuscated m_d->allowUpdates = false;
        set it explicitly to make it consistent with the rest and remove this slot
      - make sure currentColor is in the proper color space after lockUsedColorSpace(),
        otherwise our input widgets will switch right back when the dialog gets shown
      - fix logic on which update calls to accept/ignore
    • Mathias Wein's avatar
      Cleanup KisVisualColorSelector signaling a bit: · 9f40b7f9
      Mathias Wein authored
      - connect all shapes to updateFromWidgets()
      - don't emit signals in setColorFromSibling() when we have to
        block them later, signal updates in updateFromWidgets() instead
      - call updateSelectorElements() directly in updateFromWidgets(),
        saves us a check in slotSetColor()
    • Mathias Wein's avatar
      KisVisualColorSelector layout improvements: · 92995858
      Mathias Wein authored
      - Don't use automatic layout for dual-box (CMYK) selector,
        the boxes really don't like to be non-square
      - Don't create empty layout in constructor that we're
        never using before replacing anyway
      - Remove redundant geometry setup, just call resizeEvent()
    • Mathias Wein's avatar
    • Wolthera van Hövell's avatar
      Make use of LCMS' copy alpha flag instead of copying alpha ourselves. · 48d339ea
      Wolthera van Hövell authored
      This should make color management related transforms a bit faster, as
      well as simplifying the code. Given an enum in the depths of the pigment
      jungle is being changed, it takes long to compile.
      boud thought there was more alpha handling that needed to be changed,
      but this is the only place I can see with a workaround...
      Ref T3503
    • Dmitry Kazakov's avatar
      Do not include KoCompositeOps.h where not needed · 6bef07c0
      Dmitry Kazakov authored
      Use KoCompositeOpRegistry.h to get IDs of the composite opsinstead.
      The former one is used by colorspaces to actually create the composite
      op objects.
    • Boudewijn Rempt's avatar
      debug-- · 87ecd47e
      Boudewijn Rempt authored
  4. 04 Sep, 2019 1 commit
    • Wolthera van Hövell's avatar
      Possibly fix File Layer loading and comics manager page updating on windows. · ff338de7
      Wolthera van Hövell authored
      Windows has a pretty slow file system, which means when we check whether
      our updated file exists, windows hasn't gotten to renaming it yet, making
      Krita think there's no file at all...
      So this puts a little bit of a delay in our two checks of whether the file still
      exists and needs to be readded to the filesystemwatcher again.
      This currently works as expected on Linux, now we need to test if it works
      on Windows.
  5. 02 Sep, 2019 9 commits