Patent ID: 7167184

Claim:
A computer-implemented method of performing a blending operation between a first pixel having a first pixel alpha value and a first pixel color data value and a second pixel having a second pixel alpha value and a second pixel color data value, comprising: providing an equation for calculating pixel blending factors, the equation including a pre-defined set of logical operations and a set of constants, wherein when a particular set of values is selected for the constants in the equation, the equation corresponds to a specific Porter-Duff compositing equation; selecting a Porter-Duff composition equation by assigning a first set of values for the first pixel to the constants in the equation and assigning a second set of values for the second pixel to the constants in the equation, wherein the first and second sets of values are selected front a same finite set of constant values; calculating a first pixel blending factor and a second pixel blending factor based upon the selected Porter-Duff compositing equation, the first pixel alpha value, and the second pixel alpha value using the equation and without using conditional tests; calculating a resulting alpha value based upon the first pixel blending factor, the second pixel blending factor, the first alpha value, and the second alpha value; calculating a resulting color value based upon the first pixel blending factor, the second pixel blending factor, the first pixel color data value, and the second pixel color data value; associating the resulting alpha value and the resulting color data value with the second pixel; and displaying the second pixel.