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

commits at source.squeak.org commits at source.squeak.org
Wed Dec 18 15:06:45 UTC 2013


Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.281.mcz

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

Name: Graphics-nice.281
Author: nice
Time: 18 December 2013, 4:05:03.766 pm
UUID: 5e263108-682f-4d09-bcdc-2f318c6d6a63
Ancestors: Graphics-fbs.280

Add Form>>copy using a postCopy mechanism.
Don't copy the offset, since Points are never mutated.
Let deepCopy answer a simple copy.
This is faster for ColorForm because it avoids enumerating colors and avoids transforming ColorArray -> Array.

=============== Diff against Graphics-fbs.280 ===============

Item was removed:
- ----- Method: ColorForm>>deepCopy (in category 'copying') -----
- deepCopy
- 
- 	^ self shallowCopy
- 		bits: bits copy;
- 		offset: offset copy;
- 		colors: colors
- !

Item was added:
+ ----- Method: ColorForm>>postCopy (in category 'copying') -----
+ postCopy
+ 	super postCopy.
+ 	colors := colors copy.
+ !

Item was added:
+ ----- Method: CursorWithMask>>postCopy (in category 'copying') -----
+ postCopy
+ 	super postCopy.
+ 	maskForm := maskForm copy!

Item was changed:
  ----- Method: Form>>deepCopy (in category 'copying') -----
  deepCopy
+ 	^self copy!
- 
- 	^ self shallowCopy
- 		bits: bits copy;
- 		offset: offset copy
- !

Item was added:
+ ----- Method: Form>>postCopy (in category 'copying') -----
+ postCopy
+ 	super postCopy.
+ 	bits := bits copy
+ !



More information about the Squeak-dev mailing list