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