[Pkg] The Trunk: Collections-tpr.511.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Mar 25 21:11:24 UTC 2013
tim Rowledge uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-tpr.511.mcz
==================== Summary ====================
Name: Collections-tpr.511
Author: tpr
Time: 25 March 2013, 2:10:42.848 pm
UUID: 028a2dce-fd27-49ab-adc5-933eb24e0bdb
Ancestors: Collections-tpr.510
Remove BitBlt|WarpBlt>current usage - it's a vestige of an old experiment
=============== Diff against Collections-nice.509 ===============
Item was changed:
----- Method: PositionableStream>>nextWordsInto: (in category 'accessing') -----
nextWordsInto: aBitmap
"Fill the word based buffer from my collection.
Stored on stream as Big Endian. Optimized for speed.
Read in BigEndian, then restoreEndianness."
| blt pos source byteSize |
collection class isBytes
ifFalse: [^ self next: aBitmap size into: aBitmap startingAt: 1].
byteSize := aBitmap byteSize.
"is the test on collection basicSize \\ 4 necessary?"
((self position bitAnd: 3) = 0 and: [ (collection basicSize bitAnd: 3) = 0])
ifTrue: [source := collection.
pos := self position.
self skip: byteSize]
ifFalse: ["forced to copy it into a buffer"
source := self next: byteSize.
pos := 0].
"Now use BitBlt to copy the bytes to the bitmap."
+ blt := (BitBlt
- blt := (BitBlt current
toForm: (Form new hackBits: aBitmap))
sourceForm: (Form new hackBits: source).
blt combinationRule: Form over. "store"
blt sourceX: 0;
sourceY: pos // 4;
height: byteSize // 4;
width: 4.
blt destX: 0;
destY: 0.
blt copyBits.
"And do whatever the bitmap needs to do to convert from big-endian order."
aBitmap restoreEndianness.
^ aBitmap "May be WordArray, ColorArray, etc"
!
More information about the Packages
mailing list