[Vm-dev] [commit][3146] update BitBltGeneric. c to mask out the alpha channel in the pxiel compare routine; this makes it possible to test colors without regard to the translucency

commits at squeakvm.org commits at squeakvm.org
Mon Nov 24 02:12:17 UTC 2014


Revision: 3146
Author:   rowledge
Date:     2014-11-23 18:12:04 -0800 (Sun, 23 Nov 2014)
Log Message:
-----------
update BitBltGeneric.c to mask out the alpha channel in the pxiel compare routine; this makes it possible to test colors without regard to the translucency

Modified Paths:
--------------
    trunk/platforms/Cross/plugins/BitBltPlugin/BitBltGeneric.c

Modified: trunk/platforms/Cross/plugins/BitBltPlugin/BitBltGeneric.c
===================================================================
--- trunk/platforms/Cross/plugins/BitBltPlugin/BitBltGeneric.c	2014-11-22 02:27:30 UTC (rev 3145)
+++ trunk/platforms/Cross/plugins/BitBltPlugin/BitBltGeneric.c	2014-11-24 02:12:04 UTC (rev 3146)
@@ -484,8 +484,8 @@
         b32 >>= bppB * (pixelIndexes >> 27);
     while (width > 0)
     {
-        uint32_t a = msbA ? a32 >> (32-bppA) : a32 & ((1<<bppA)-1);
-        uint32_t b = msbB ? b32 >> (32-bppB) : b32 & ((1<<bppB)-1);
+        uint32_t a = (msbA ? a32 >> (32-bppA) : a32 & ((1<<bppA)-1)) & 0xFFFFFF;
+        uint32_t b = (msbB ? b32 >> (32-bppB) : b32 & ((1<<bppB)-1)) & 0xFFFFFF;
         uint32_t nextPixelIndexes;
         if (matchRule == MR_pixelMatch)
             count += a == colorA && b == colorB;



More information about the Vm-dev mailing list