[Vm-dev] More bitblt extensions intend for Pi but possibly more widely useful

tim Rowledge tim at rowledge.org
Sat Dec 6 01:52:20 UTC 2014


I’ve been working with Ben Avison again to do some further extensions to bitblt for speeding up Pi scratch. This time we’ve added some code that can very quickly work out if two Forms have corresponding pixels where the colours meet some rule. Scratch uses a complex pile of bitblts and masking and tallying and probably appeals to Cthulhu to do this. We can now use prims that are very highly ARM optimised and, for example, stop when the first match is found if the test is just a ‘does this touch that’.

Since similar code is in the latest image, I think largely as eToys support, this ought to have some benefits for  any platform. Although the ARM specific code won’t do much for x86 machines, there is a generic C code loop that is still much faster than a stack of blts.

I propose to add the new prim to the BitBltPlugin soon for general release, unless someone can make really good arguments for not so doing. It is of course possible that it may take a little back and forth to get the build rules perfect.

We also made a much faster (by ARM optimising) routine to double a Scratch stage Form for the presentation mode, though I’m not sure this has very wide application. Probably this should go in the ScratchPlugin, though from the building point of view it is much easier to think of it in the bitbltplugin. Ben made full use of the macro framework provided by the fastblt framework.

So - any thoughts on this? Problems it might cause? Extra ideas for more speedups? Good places for chocolate?

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
loggerheads - lumberjack sniffing addicts





More information about the Vm-dev mailing list