Currently, in KisTextureProperties::apply the allocation of a KisPaintDevice is quite expensive (it allocates a whole new tile management thingy inside an inner fetch-dab loop).
Without this PR:
With this PR:
Two caveats:
- I hope that KisPaintDevice::clear() sets the device into a state that is similar to creating it anew; this seems to be the case from trying out the brush in Krita, but it's hard to follow what really happens in the code
- This assumes that one KisTextureProperties::apply instance is only called from one thread; this seems to be the case (I checked via QThread) and I believe there might be other problems if this assumption is broken?