counting message invocations.
Alan Grimes
alangrimes at starpower.net
Thu Mar 25 23:59:40 UTC 2004
Andreas Raab wrote:
>>I _THINK_ I have a working non-bitBlit implementation...
>>
>>
>
>I would advise STRONGLY against a non-bitBlt implementation in the general
>case (e.g., "improving" pixelAt: so that it doesn't use BitBlt). The reason
>being that BitBlt can deal with "forms" that don't even live in the Squeak
>universe (e.g., bitmaps on your native OS) that BitBlt will deal with lots
>of varying color formats, little endian forms and lots of other things.
>
>
Okay, then here's an enhancement that could have saved me a heck of a
lot of time:
Add to form > pixelAt: the comment:
"If you need to do this many times, make your own instance of BitBlt as
is done below and use it repeatedly. Look at 'senders of: BitBlt:
bitPeekerFromForm: "
Benchmark wise, an implementation of the above wiped the floor with even
my "FastColorConvert" which implemented a 100% custom implementation
from the raw BitMap. =P
Currently the biggest hog in that part of the program is "rawLuminance"
a custom addition to Color, which is basically the same as Luminance but
without the weighting.
More information about the Squeak-dev
mailing list
|