pre_mul_alpha_blend(9)
π NAME π
okay so this is pre_mul_alpha_blend(9) from the Kernel API Manual, and it is literally the alpha blending equation. no cap, the name is pre_mul_alpha_blend β alpha blending equation. π
β¨ SYNOPSIS β¨
void pre_mul_alpha_blend (const struct line_buffer *stage_buffer ,
struct line_buffer *output_buffer , int x_start , int pixel_count );
π«Ά ARGUMENTS π«Ά
stage_bufferβ the line with the pixels fromsrc_plane. thatβs the source-y bestie.output_bufferβ a line buffer that receives all the blends output. itβs giving destination energy, fr fr.x_startβ the start offset. where we begin, periodt.pixel_countβ the number of pixels to blend. how many pixels weβre serving. β¨
π DESCRIPTION π
okay so the pixels [x_start;x_start+pixel_count) in stage_buffer are blended at [x_start;x_start+pixel_count) in output_buffer. literally the same range, the blend is happening there.
the current DRM assumption is that pixel color values have already been pre-multiplied with the alpha channel values. see more drm_plane_create_blend_mode_property. also, this formula assumes a completely opaque background β like, no sneaky transparency under there, bestie. π
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpu/drm/vkms/vkms_composer.c direction_for_rotation(9)clamp_line_coordinates(9)blend_line(9)blend(9)vkms_composer_worker(9)
mwah π this pageβs source/version is ./drivers/gpu/drm/vkms, dated October 2026, and the manual page is pre_mul_alpha_blend(9). go off, bestie πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms