Sub-pixel positioning

Adrian Page adrian at
Tue Mar 16 15:48:18 CET 2004

On Tuesday 16 March 2004 10:58 am, Boudewijn Rempt wrote:
> Maybe it's an idea,
> if it's too slow, to disable it for the expensive brushes like the pipe
> brushes or the colour brushes, and just use it for the simple masks?

Could do. See how it goes once it's properly integrated.

computeDab() is currently the slow part of the paint procedure, with its 
single pixel writes. That gets hit every time the pressure changes, or each 
dab paint for pipe brushes. I think there's plenty of scope for optimisation 

Using valgrind to profile KisToolBrush::mouseMove() with a pipe brush, about 
80-90% of the time is spent in computeDab(), and around 10% in 
compositeCopy() and compositeOver(). The compositing code also has plenty of 
room for improvement, part of which would be using premultiplied alpha for 
the RGBA buffers. We can also replace division by shifts and optimise for 
each channel depth we support.


More information about the kimageshop mailing list