1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +00:00

LibAccelGfx: Set blending for alpha separately to be sum of src and dst

With this change we match blending in LibGfx and it fixes rendering on
all websites that use opacity < 1.
This commit is contained in:
Aliaksandr Kalenik 2023-12-04 18:24:41 +01:00 committed by Alexander Kalenik
parent c55d8a9971
commit 2361ce25a0
3 changed files with 9 additions and 9 deletions

View file

@ -36,10 +36,10 @@ static GLenum to_gl_enum(BlendFactor factor)
VERIFY_NOT_REACHED();
}
void enable_blending(BlendFactor source, BlendFactor destination)
void enable_blending(BlendFactor source, BlendFactor destination, BlendFactor source_alpha, BlendFactor destination_alpha)
{
glEnable(GL_BLEND);
glBlendFunc(to_gl_enum(source), to_gl_enum(destination));
glBlendFuncSeparate(to_gl_enum(source), to_gl_enum(destination), to_gl_enum(source_alpha), to_gl_enum(destination_alpha));
verify_no_error();
}