1. 13 Jul, 2019 1 commit
    • Boudewijn Rempt's avatar
      Use QFileInfo::completeBaseName instead of baseName · 14adaa3b
      Boudewijn Rempt authored
      This makes it possible for users to use dots in their filenames.
      Not that that is a good idea, everything after the first dot is
      technically an extensions, as in bla.tar.gz, but Krita doesn't
      handle any file formats where that actually happens, so we can
      be a bit less technically correct when handling filenames and
      only check the extension after the last dot.
      
      BUG:409765
      14adaa3b
  2. 12 Jun, 2019 1 commit
  3. 17 May, 2019 1 commit
  4. 14 May, 2019 1 commit
  5. 13 May, 2019 2 commits
  6. 04 May, 2019 2 commits
  7. 30 Apr, 2019 1 commit
    • Boudewijn Rempt's avatar
      Use allGray instead of isGrayScale to determine whether the brush tip is grayscale · f35496cf
      Boudewijn Rempt authored
      This works around a bug in QImage::isGrayScale where images with
      16 bits/channel are not checked with allGray, so by default are not
      grayscale. These images have depth 64, which is not in the switch
      statement:
      
      bool QImage::isGrayscale() const
      {
          if (!d)
              return false;
      
          if (d->format == QImage::Format_Alpha8)
              return false;
      
          if (d->format == QImage::Format_Grayscale8)
              return true;
      
          switch (depth()) {
          case 32:
          case 24:
          case 16:
              return allGray();
          case 8: {
              Q_ASSERT(d->format == QImage::Format_Indexed8);
              for (int i = 0; i < colorCount(); i++)
                  if (d->colortable.at(i) != qRgb(i,i,i))
                      return false;
              return true;
              }
          }
          return false;
      }
      
      BUG:405693
      f35496cf
  8. 23 Jan, 2019 1 commit
  9. 05 Jan, 2019 1 commit
  10. 07 Oct, 2018 1 commit
  11. 14 Aug, 2018 1 commit
    • Dmitry Kazakov's avatar
      Make unit tests' names consistent · 46c27f94
      Dmitry Kazakov authored
      TEST_NAME parameter should state **only** the actual name
      of the test without any prefixes. NAME_PREFIX should state \
      the prefix. And, no, we cannot shortcut the thing and concatenate
      the name and the prefix in TEST_NAME, because it will break actual
      tests' binary file names.
      46c27f94
  12. 05 Aug, 2018 1 commit
  13. 17 Jul, 2018 1 commit
  14. 26 Jun, 2018 1 commit
  15. 20 Jun, 2018 1 commit
  16. 15 May, 2018 4 commits
  17. 10 May, 2018 1 commit
  18. 26 Apr, 2018 1 commit
  19. 15 Mar, 2018 2 commits
    • Boudewijn Rempt's avatar
      remove unused include · 1f2b6e35
      Boudewijn Rempt authored
      1f2b6e35
    • Boudewijn Rempt's avatar
      Resources: Remove KoResourceLoaderThread · 5d361cf0
      Boudewijn Rempt authored
      All resources were loaded synchronously by now, so KoResourceLoaderThread
      was obsolete. This also moved the bundle server to it's own singleton,
      since it needs a completely instantiated singleton of KisResourceServerProvider.
      
      KisApplication now instantiates the singletons in the correct order, without
      superfluously getting the actual resource providers. Since the order is now
      properly known, we can clear the empty krita 3 system preset tags from the
      tag database after loading the last bundles. However, the tag system seems
      to be case-insensitive, but we used to have both ink and Ink; that still
      needs fixing.
      
      This fixes item 2 from
      
      CCBUG:391576
      
      Curiously enough, this also makes Krita start quite a bit faster for me...
      5d361cf0
  20. 01 Mar, 2018 1 commit
  21. 30 Jan, 2018 1 commit
  22. 17 Jan, 2018 2 commits
  23. 02 Jan, 2018 1 commit
  24. 27 Dec, 2017 1 commit
    • Dmitry Kazakov's avatar
      Implement dependent size changes for the Masking Brush · a641fec9
      Dmitry Kazakov authored
      Now the masking brush changes according to these requirements:
      
      1) When the brush size is changed in the brush editor, masking
         brush size is kept unchanged
      
      2) When the brush size is changed using quick-controls, that is
         toolbox slider, shift+gesture, HUD display, the masking brush size
         is changed proportionally.
      
      3) Technically, the masking brush supports disabling this "dependent
         size" functionality, but I'm not sure if it should be visible in GUI.
         It is already overcomplicated.
      
      Technical changes:
      
      1) Now the brushes are always **copied** when fetched from the
         brushes registry. That is, if you load the brush using
         KisBrush::fromXML(), you will always have your own copy of the
         brush object, not shared with the one in the server.
      
      2) For the efficiency reasons, the brush tip QImage will be lazily
         shared with the one on the server using the Qt's internal algorithm.
         If you change the brush tip in you copy of the brush, Qt will deep-
         copy the corresponding QImage.
      
      3) For the efficiency reasons, brush mipmap pyramid (KisQImagePyramid)
         is also shared among all the instances of the brush with
         the same brush tip QImage. Every time one changes the instance of
         the brush, the pyramid object is detached and reset. This basic
         lazy copying algorithm is implemented in KisSharedQImagePyramid.
      
      CC:kimageshop@kde.org
      a641fec9
  25. 24 Nov, 2017 1 commit
    • Boudewijn Rempt's avatar
      Fix saving GBR brushes · 8602a1aa
      Boudewijn Rempt authored
      We should set the brush tip image, because that's what saved,
      not the image(), which is just the icon.
      
      BUG:382068
      8602a1aa
  26. 23 Nov, 2017 1 commit
    • Boudewijn Rempt's avatar
      Add a copy constructor to the KisPngBrush · 9af46f6f
      Boudewijn Rempt authored
      Because otherwise the brush won't be valid (even if it _can_ be
      used), and Krita will assert in KisBrush.cpp:488. (If q_asserts
      are built in, which they aren't when building with relwithdebinfo).
      9af46f6f
  27. 26 Oct, 2017 1 commit
  28. 10 Oct, 2017 2 commits
  29. 09 Oct, 2017 1 commit
    • Dmitry Kazakov's avatar
      Port KisBrushOp to use "mutated" and "uniquely concurrent" jobs · 0f1a20d3
      Dmitry Kazakov authored
      Now all the threading in KisBrushOp is done using strokes framework only,
      therefore we can throttle CPU in a correct way.
      
      The patch also includes:
      
      1) KisStrokeStrategy::balancingRatioOverride() can now override the
         global preferred queues balancing ratio. Basically, when the paintop
         supports async updates we set updates higher priority over brush jobs.
      
      2) KisPainter::runnableStrokeJobsInterface() now must hold a pointer to the
         currently preferred jobs execution engines.
      
         TODO: implement a fake default execution engine, tight now all the
               unittests will crash as soon as they try to paint with a paintop
      
      3) KisBrush::threadingAllowed() now tells if the brush is allowed to
         use internals multithreading with QtConcurrent. It is forbidden for
         the asynchronous paintops, because it saturates CPU cores with extra
         threads.
      0f1a20d3
  30. 15 Sep, 2017 1 commit
  31. 27 Jul, 2017 1 commit
    • Boudewijn Rempt's avatar
      Fix reference counting for the text brush · 70607a52
      Boudewijn Rempt authored
      The actual bug puzzles me, because it could only have happened
      if there were a paintop preset with a text brush, and the reporter
      said all his custom brushes and presets were removed and this
      still happened, but logically this is the only place where the
      given backtrace could come from.
      
      BUG:382588
      70607a52
  32. 27 May, 2017 1 commit