The Trunk: Graphics-bf.368.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Graphics-bf.368.mcz

commits-2
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].!