Skip to content

Mask generation refactor

This commit is a preparation for the xsimd port. It refactors the following:

  • FastRowProcessor is now a templated class that takes the individual generators + a friend class statement. This allows to hide the implementation inside a Vc-aware processor factory.
  • MaskApplicatorFactory is now Vc-aware, needing only the generator class as a parameter.
  • MaskApplicatorFactory is now instantiated separately for the Scalar mode, implementing properly the #define hack used for the Vc-free mode by splitting the cpp in two source files.
  • Scalar and vector applicators are now compiled separately, allowing to use the latter only when Vc is available, and thus enabling the above change.

I would like this change to land before 5.1, so as to beta test everything before the actual xsimd port.

CCMAIL: kimageshop@kde.org

Test Plan

Build Krita with Vc and check that, with optimizations disabled, painting still works without visual glitches. (Even if slowly.)

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports

Loading