Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.506.mcz
==================== Summary ====================
Name: Graphics-mt.506 Author: mt Time: 30 March 2022, 10:14:23.797457 am UUID: 1934ae70-75f2-9041-a4b6-aa12b4125cc3 Ancestors: Graphics-mt.505
Adds commentary about the side effects of #copyBits and #deferUpdates:.
=============== Diff against Graphics-mt.505 ===============
Item was changed: ----- Method: BitBlt>>copyBits (in category 'copying') ----- copyBits "Primitive. Perform the movement of bits from the source form to the destination form. Fail if any variables are not of the right type (Integer, Float, or Form) or if the combination rule is not implemented. + + NOTE THAT this method has the side effect of showing the copied bits on + screen if the destination form happens to be Display. The mechanism is + similar to calling #primShowRectLeft:right:top:bottom: manually. + In addition to the original 16 combination rules, this BitBlt supports 16 fail (to simulate paint) 17 fail (to simulate mask) 18 sourceWord + destinationWord 19 sourceWord - destinationWord 20 rgbAdd: sourceWord with: destinationWord 21 rgbSub: sourceWord with: destinationWord 22 rgbDiff: sourceWord with: destinationWord 23 tallyIntoMap: destinationWord 24 alphaBlend: sourceWord with: destinationWord 25 pixPaint: sourceWord with: destinationWord 26 pixMask: sourceWord with: destinationWord 27 rgbMax: sourceWord with: destinationWord 28 rgbMin: sourceWord with: destinationWord 29 rgbMin: sourceWord bitInvert32 with: destinationWord " <primitive: 'primitiveCopyBits' module: 'BitBltPlugin' error: ec>
(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue: ["No alpha specified -- re-run with alpha = 1.0" ^ self copyBitsTranslucent: 255]. "Check for object movement during a surface callback, compressed source, destination or halftone forms. Simply retry." (ec == #'object moved' or: [(sourceForm isForm and: [sourceForm unhibernate]) or: [(destForm isForm and: [destForm unhibernate]) or: [halftoneForm isForm and: [halftoneForm unhibernate]]]]) ifTrue: [^self copyBits].
"Check for unimplmented rules" combinationRule = Form oldPaint ifTrue: [^self paintBits]. combinationRule = Form oldErase1bitShape ifTrue: [^self eraseBits].
"Check if BitBlt doesn't support full color maps" (colorMap notNil and: [colorMap isColormap]) ifTrue: [colorMap := colorMap colors. ^self copyBits]. "Check if clipping got way out of range" self clipRange. "Convert all numeric parameters to integers and try again." self roundVariables. ^self copyBitsAgain!
Item was changed: ----- Method: DisplayScreen>>deferUpdates: (in category 'other') ----- deferUpdates: aBoolean + "Set the deferUpdates flag in the virtual machine. When this flag is true, BitBlt operations on the Display are not automatically propagated to the screen. If this underlying platform does not support deferred updates, this primitive will fail. Answer whether updates were deferred before if the primitive succeeds, nil if it fails. + + Note that when disabling deferred upates again after modifying the receiver, it is advisable to call #forceDisplayUpdate so that the deferred updates can actually be displayed on the screen." - | wasDeferred | - "Set the deferUpdates flag in the virtual machine. When this flag is true, BitBlt operations on the Display are not automatically propagated to the screen. If this underlying platform does not support deferred updates, this primitive will fail. Answer whether updates were deferred before if the primitive succeeds, nil if it fails."
+ | wasDeferred | wasDeferred := DeferringUpdates == true. DeferringUpdates := aBoolean. ^(self primitiveDeferUpdates: aBoolean) ifNotNil: [wasDeferred]!
packages@lists.squeakfoundation.org