Removes heap allocation in KisPaintInformation.
This is a hacky proof-of-concept experiment so don't judge it too hard :P
TODO: Compare the performance with original, do some profiling. e.g. normal painting / painting with stabilizer / other stuff
I did a quick profiling with the original code drawing with stabilizer and I found malloc and free related to this class taking a lot of time.
Problems: with this approach
- Brittle
- space wasted when Private is smaller than the reserved size
- Still need to change header file whenever new fields are added which cause the size to exceed the reserved size
- Why do I need const_cast???
- Alignment? The original class has EIGEN_MAKE_ALIGNED_OPERATOR_NEW but I don't see any Eigen classes used as member field.