Fix inner branch code.
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 18 Sep 2008 15:44:36 +0000 (11:44 -0400)
committerJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 18 Sep 2008 15:44:36 +0000 (11:44 -0400)
The entire source must be 0 not just the alpha component.
Fix some comments too.

pixman/pixman-arm.c

index 77c37ac..b73134c 100644 (file)
@@ -133,14 +133,14 @@ fbCompositeSrc_8888x8888arm (pixman_op_t op,
                        "cmp %[w], #0\n\t"
                        "beq 2f\n\t"
                        "1:\n\t"
-                       /* load dest */
+                       /* load src */
                        "ldr r5, [%[src]], #4\n\t"
 #ifdef inner_branch
                        /* We can avoid doing the multiplication in two cases: 0x0 or 0xff.
                         * The 0x0 case also allows us to avoid doing an unecessary data
                         * write which is more valuable so we only check for that */
-                       "cmp r5, #0x1000000\n\t"
-                       "blt 3f\n\t"
+                       "cmp r5, #0\n\t"
+                       "beq 3f\n\t"
 
                        /* = 255 - alpha */
                        "sub r8, %[alpha_mask], r5, lsr #24\n\t"
@@ -227,14 +227,14 @@ fbCompositeSrc_8888x8x8888arm (pixman_op_t op,
                        "cmp %[w], #0\n\t"
                        "beq 2f\n\t"
                        "1:\n\t"
-                       /* load dest */
+                       /* load src */
                        "ldr r5, [%[src]], #4\n\t"
 #ifdef inner_branch
                        /* We can avoid doing the multiplication in two cases: 0x0 or 0xff.
                         * The 0x0 case also allows us to avoid doing an unecessary data
                         * write which is more valuable so we only check for that */
-                       "cmp r5, #0x1000000\n\t"
-                       "blt 3f\n\t"
+                       "cmp r5, #0\n\t"
+                       "beq 3f\n\t"
 
 #endif
                        "ldr r4, [%[dest]] \n\t"
@@ -347,9 +347,7 @@ fbCompositeSolidMask_nx8x8888arm (pixman_op_t      op,
                        /* We can avoid doing the multiplication in two cases: 0x0 or 0xff.
                         * The 0x0 case also allows us to avoid doing an unecessary data
                         * write which is more valuable so we only check for that */
-                       /* 0x1000000 is the least value that contains alpha all values
-                        * less than it have a 0 alpha value */
-                       "cmp r5, #0x0\n\t"
+                       "cmp r5, #0\n\t"
                        "beq 3f\n\t"
 
 #endif