Author: Lars Wassermann <[email protected]>
Branch: 
Changeset: r295:a284054344a3
Date: 2013-04-17 18:26 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/a284054344a3/

Log:    added more concrete rule for pixPaint (combinationRule 25) the
        effect is still of though

diff --git a/BitBltSim.19.cs b/BitBltSim.19.cs
--- a/BitBltSim.19.cs
+++ b/BitBltSim.19.cs
@@ -141,7 +141,7 @@
                                ifTrue:
                                        [prevWord _ prevWord bitAnd: 
simSkewMask.
                                                "XXX: Hack to work around 
out-of-bounds access"
-                                       thisWord := (simSourceIndex < 0 or: 
[simSourceIndex >= simSourceBits size])
+                                       thisWord _ (simSourceIndex < 0 or: 
[simSourceIndex >= simSourceBits size])
                                                                ifTrue: 
[simSourceBits at: 1]
                                                                ifFalse: 
[simSourceBits at: simSourceIndex + 1].
                                                                                
                                        "pick up next word"
@@ -194,7 +194,7 @@
                        combinationRule = 22 ifTrue: [^ dstWord]. "OLDrgbDiff"
                        combinationRule = 23 ifTrue: [^ dstWord]. 
"OLDtallyIntoMap"
                        combinationRule = 24 ifTrue: [^ dstWord]. "alphaBlend"
-                       combinationRule = 25 ifTrue: [^ dstWord]. "pixPaint"
+                       combinationRule = 25 ifTrue: [^ self pixPaint: srcWord 
with: dstWord].
                        combinationRule = 26 ifTrue: [^ dstWord]. "pixMask"
                        combinationRule = 27 ifTrue: [^ dstWord]. "rgbMax"
                        combinationRule = 28 ifTrue: [^ dstWord]. "rgbMin"
@@ -213,6 +213,11 @@
                        combinationRule = 41 ifTrue: [^ dstWord]. 
"rgbComponentAlpha"].
        self error: 'Combination Rule is not supported.'! !
 
+!BitBlt methodsFor: 'simulation' stamp: 'tfel 1/1/1981 00:00'!
+pixPaint: srcWord with: dstWord
+       srcWord = 0 ifTrue: [^ dstWord].
+       ^ srcWord bitOr: (dstWord bitAnd: srcWord bitInvert32)! !
+
 !BitBlt methodsFor: 'simulation' stamp: 'tfel 3/15/2013 14:49'!
 sanitizeInput
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to