wg/gl: add composition blend mode

Set the scene to use Composition mode so that it generates a pre-composition image, and then normal blend with destination.

https://github.com/thorvg/thorvg/pull/3621
This commit is contained in:
Sergii Liebodkin 2025-07-24 16:03:03 +03:00
parent 9369642642
commit 156edad6c5
2 changed files with 2 additions and 5 deletions

View file

@ -980,10 +980,7 @@ const RenderSurface* GlRenderer::mainSurface()
bool GlRenderer::blend(BlendMethod method)
{
if (method == mBlendMethod) return true;
mBlendMethod = method;
mBlendMethod = (method == BlendMethod::Composition ? BlendMethod::Normal : method);
return true;
}

View file

@ -283,7 +283,7 @@ RenderRegion WgRenderer::region(RenderData data)
bool WgRenderer::blend(BlendMethod method)
{
mBlendMethod = method;
mBlendMethod = (method == BlendMethod::Composition ? BlendMethod::Normal : method);
return true;
}