Lines Matching refs:top

38 			uint16 t1, uint16 t2, uint16 t3, uint8 ta,	// top components
62 uint8 t1, uint8 t2, uint8 t3, uint8 ta, // top components
216 blend_colors_copy(uint8* dest, uint8* bottom, uint8* top)
218 if (bottom[3] == 0 || top[3] == 255) {
219 dest[0] = top[0];
220 dest[1] = top[1];
221 dest[2] = top[2];
222 dest[3] = top[3];
225 top[0], top[1], top[2], top[3],
232 blend_pixels(uint8* bottom, uint8* top, uint8 alpha)
236 bottom[0] = top[0];
237 bottom[1] = top[1];
238 bottom[2] = top[2];
239 bottom[3] = top[3];
242 uint16 t1 = kGammaTable[top[0]];
243 uint16 t2 = kGammaTable[top[1]];
244 uint16 t3 = kGammaTable[top[2]];
249 uint8 mergeAlpha = bottom[3] ? (top[3] * alpha) / 255 : 255;
254 bottom[3] = (bottom[3] * (255 - alpha) + top[3] * alpha) / 255;
261 blend_pixels_copy(uint8* bottom, uint8* top, uint8* dest, uint8 alpha)
265 dest[0] = top[0];
266 dest[1] = top[1];
267 dest[2] = top[2];
268 dest[3] = top[3];
271 uint16 t1 = kGammaTable[top[0]];
272 uint16 t2 = kGammaTable[top[1]];
273 uint16 t3 = kGammaTable[top[2]];
278 uint8 mergeAlpha = bottom[3] ? (top[3] * alpha) / 255 : 255;
283 dest[3] = (bottom[3] * (255 - alpha) + top[3] * alpha) / 255;
295 blend_pixels_overlay(uint8* bottom, uint8* top, uint8 alphaOverride)
297 uint8 alpha = (top[3] * alphaOverride) / 255;
300 bottom[0] = top[0];
301 bottom[1] = top[1];
302 bottom[2] = top[2];
303 bottom[3] = top[3];
306 uint16 t1 = kGammaTable[top[0]];
307 uint16 t2 = kGammaTable[top[1]];
308 uint16 t3 = kGammaTable[top[2]];
318 bottom[3] = (bottom[3] * (255 - alpha) + top[3] * alpha) / 255;
325 blend_pixels_overlay_copy(uint8* bottom, uint8* top, uint8* dest, uint8 alphaOverride)
327 uint8 alpha = (top[3] * alphaOverride) / 255;
330 dest[0] = top[0];
331 dest[1] = top[1];
332 dest[2] = top[2];
333 dest[3] = top[3];
336 uint16 t1 = kGammaTable[top[0]];
337 uint16 t2 = kGammaTable[top[1]];
338 uint16 t3 = kGammaTable[top[2]];
348 dest[3] = (bottom[3] * (255 - alpha) + top[3] * alpha) / 255;
488 blend_colors_copy(uint8* dest, uint8* bottom, uint8* top)
490 if (bottom[3] == 0 || top[3] == 255) {
491 dest[0] = top[0];
492 dest[1] = top[1];
493 dest[2] = top[2];
494 dest[3] = top[3];
497 uint32 destAlpha = 255 - top[3];
498 dest[0] = (uint8)((bottom[0] * destAlpha + top[0] * top[3]) / 255);
499 dest[1] = (uint8)((bottom[1] * destAlpha + top[1] * top[3]) / 255);
500 dest[2] = (uint8)((bottom[2] * destAlpha + top[2] * top[3]) / 255);
503 uint8 alphaRest = 255 - top[3];
506 uint32 alphaSrc = 255 * top[3];
507 dest[0] = (bottom[0] * alphaDest + top[0] * alphaSrc) / alphaTemp;
508 dest[1] = (bottom[1] * alphaDest + top[1] * alphaSrc) / alphaTemp;
509 dest[2] = (bottom[2] * alphaDest + top[2] * alphaSrc) / alphaTemp;
517 blend_pixels(uint8* bottom, uint8* top, uint8 alpha)
521 bottom[0] = top[0];
522 bottom[1] = top[1];
523 bottom[2] = top[2];
524 bottom[3] = top[3];
526 uint8 mergeAlpha = bottom[3] ? (top[3] * alpha) / 255 : 255;
528 bottom[0] = (bottom[0] * invAlpha + top[0] * mergeAlpha) / 255;
529 bottom[1] = (bottom[1] * invAlpha + top[1] * mergeAlpha) / 255;
530 bottom[2] = (bottom[2] * invAlpha + top[2] * mergeAlpha) / 255;
531 bottom[3] = (bottom[3] * (255 - alpha) + top[3] * alpha) / 255;
538 blend_pixels_copy(uint8* bottom, uint8* top, uint8* dest, uint8 alpha)
542 dest[0] = top[0];
543 dest[1] = top[1];
544 dest[2] = top[2];
545 dest[3] = top[3];
547 uint8 mergeAlpha = bottom[3] ? (top[3] * alpha) / 255 : 255;
549 dest[0] = (bottom[0] * invAlpha + top[0] * mergeAlpha) / 255;
550 dest[1] = (bottom[1] * invAlpha + top[1] * mergeAlpha) / 255;
551 dest[2] = (bottom[2] * invAlpha + top[2] * mergeAlpha) / 255;
552 dest[3] = (bottom[3] * (255 - alpha) + top[3] * alpha) / 255;
564 blend_pixels_overlay(uint8* bottom, uint8* top, uint8 alphaOverride)
566 uint8 alpha = (top[3] * alphaOverride) / 255;
569 bottom[0] = top[0];
570 bottom[1] = top[1];
571 bottom[2] = top[2];
572 bottom[3] = top[3];
576 bottom[0] = (bottom[0] * invAlpha + top[0] * mergeAlpha) / 255;
577 bottom[1] = (bottom[1] * invAlpha + top[1] * mergeAlpha) / 255;
578 bottom[2] = (bottom[2] * invAlpha + top[2] * mergeAlpha) / 255;
579 bottom[3] = (bottom[3] * (255 - alpha) + top[3] * alpha) / 255;
586 blend_pixels_overlay_copy(uint8* bottom, uint8* top, uint8* dest, uint8 alphaOverride)
588 uint8 alpha = (top[3] * alphaOverride) / 255;
591 dest[0] = top[0];
592 dest[1] = top[1];
593 dest[2] = top[2];
594 dest[3] = top[3];
598 dest[0] = (bottom[0] * invAlpha + top[0] * mergeAlpha) / 255;
599 dest[1] = (bottom[1] * invAlpha + top[1] * mergeAlpha) / 255;
600 dest[2] = (bottom[2] * invAlpha + top[2] * mergeAlpha) / 255;
601 dest[3] = (bottom[3] * (255 - alpha) + top[3] * alpha) / 255;