[squeak-dev] The Trunk: Graphics-eem.399.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jun 17 22:50:02 UTC 2018

Eliot Miranda uploaded a new version of Graphics to project The Trunk:

==================== Summary ====================

Name: Graphics-eem.399
Author: eem
Time: 17 June 2018, 3:49:31.430583 pm
UUID: 06730754-91ab-4e8b-9461-8911c2feca0b
Ancestors: Graphics-mt.398

Form>>hackBits: must use btyesPerBasicElement:, not bytesPerElement:, to not be confused by classes such as ShortIntegerArray which pack shorts into words.

Note that on Spur this isn't necessary now that 16-bit indexability is supported directly.

=============== Diff against Graphics-mt.398 ===============

Item was changed:
  ----- Method: Form>>hackBits: (in category 'private') -----
  hackBits: bitThing
  	"This method provides an initialization so that BitBlt may be used, eg, to 
  	copy ByteArrays and other non-pointer objects efficiently.
  	The resulting form looks 4 wide, 8 deep, and bitThing-size-in-words high."
  	width := 4.
  	depth := 8.
  	bitThing class isBits ifFalse: [self error: 'bitThing must be a non-pointer object'].
+ 	height := bitThing basicSize * bitThing bytesPerBasicElement // width.
- 	height := bitThing basicSize * bitThing bytesPerElement // width.
  	bits := bitThing!

More information about the Squeak-dev mailing list