[squeak-dev] The Trunk: Graphics-nice.282.mcz

Frank Shearar frank.shearar at gmail.com
Fri Dec 20 14:35:27 UTC 2013


On 20 December 2013 00:34,  <commits at source.squeak.org> wrote:
> Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
> http://source.squeak.org/trunk/Graphics-nice.282.mcz
>
> ==================== Summary ====================
>
> Name: Graphics-nice.282
> Author: nice
> Time: 20 December 2013, 1:34:17.553 am
> UUID: 89166f93-3989-4cbd-aa5e-14f949960b9b
> Ancestors: Graphics-nice.281
>
> 1) Fix initialization of a Form bits. the guard against wrong bitsSize were never invoked on new instances.
>
> 2) Accelerate a bit Color>>pixelValueForDepth:,
> 2.a) Most frequent usage nowadays is for 32 bits depth, so raise this case to the top.
> 2.b) the guard against rgb=0 being used for marking transparent can be factored out
>    (Note that Squeak was not the only app. to use this trick, like explained at
>     http://en.wikipedia.org/wiki/Palette_%28computing%29#Transparent_color_in_palettes)
> 2.c) The (LargeInteger new: 4) trick is now more straightforward thanks to 2.b)
>    Note 1: the normalize could be replaced by yourself in 32 bits images,
>    but the futur never were so close than now ;) - I mean Spur
>    Note 2: I check that using SmallInteger arithmetic and final LargeIntegerization is slower, COG or not.
>    So the (LargeInteger new: 4) trick will stay a while longer.
>    It would be more efficient to reduce Color componentMax to: 255.0, then use a single + 16rFF000000...
>
> 3) Guard more Form bits inst. var. access with unhibernate.
>   This was not applied to pixelValueAt: because this message is used inside tight loops,
>   and it would be preferable (more efficient) to fail the primitive, and unhibernate in the fallback code.
>
> 4) Classify a few methods exclusively used by PostScript generation under 'postscript generation'.
>   I know they virtually could be used for something else, but there's enough API to digest and classification helps.
>   It will be time to unclassify eventually if ever someone send those messages
>
> =============== Diff against Graphics-nice.281 ===============

I have an idea this broke some PNG tests in GraphicsTests. (Reason:
http://build.squeak.org/job/SqueakTrunk/701/console shows
Graphics-nice.281, with the tests passing, while
http://build.squeak.org/job/SqueakTrunk/702/console shows
Grpahics-nice.282, with the tests failing.

(PNGReadWriterTest >> #testPngEncodingColors32, for instance)

frank


More information about the Squeak-dev mailing list