[squeak-dev] The Trunk: Graphics-bf.368.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jan 31 16:56:16 UTC 2017


Bert Freudenberg uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-bf.368.mcz

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

Name: Graphics-bf.368
Author: bf
Time: 31 January 2017, 8:55:04.767278 am
UUID: 404d8e9d-2ce0-4469-a8f2-f09db034fd1a
Ancestors: Graphics-pre.367

Fix setting Display to MSB.

=============== Diff against Graphics-pre.367 ===============

Item was changed:
  ----- Method: DisplayScreen>>newDepth: (in category 'other') -----
  newDepth: pixelSize
  "
  	Display newDepth: 8.
  	Display newDepth: 1.
  "
  	| area need |
  	
  	(self supportsDisplayDepth: pixelSize)
  		ifFalse:[^self inform:'Display depth ', pixelSize printString, ' is not supported on this system'].
  
+ 	pixelSize = self nativeDepth ifTrue: [^ self  "no change"].
- 	pixelSize = self depth ifTrue: [^ self  "no change"].
  	pixelSize abs < self depth ifFalse:
  		["Make sure there is enough space"
  		area := self boundingBox area. "pixels"
  
  		need := (area * (pixelSize abs - self depth) // 8)  "new bytes needed"
  				+ Smalltalk lowSpaceThreshold.
  		(Smalltalk garbageCollectMost <= need
  			and: [Smalltalk garbageCollect <= need])
  			ifTrue: [self error: 'Insufficient free space']].
  
  	Display setExtent: Display extent depth: pixelSize.
  	Display beDisplay.
  
  	Project current ifNotNil: [:p |
  		p
  			displayDepthChanged;
  			displaySizeChanged].!



More information about the Squeak-dev mailing list