/* We modify the first clause "if d = 1" to "if d >= 1" since with premultiplied colors d > 1 can actually happen.  */
static force_inline float blend_color_burn(float sa, float s, float da, float d)
/* We modify the first clause "if d = 1" to "if d >= 1" since with premultiplied colors d > 1 can actually happen.  */
static force_inline float blend_color_burn(float sa, float s, float da, float d)
{
    if (d >= da)
	return sa * da;
    else if (sa * (da - d) >= s * da)
	return 0.0f;
    else if (FLOAT_IS_ZERO (s))
	return 0.0f;
    else
	return sa * (da - sa * (da - d) / s);
}