mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-26 08:09:14 +00:00
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:
parent
9369642642
commit
156edad6c5
2 changed files with 2 additions and 5 deletions
|
@ -980,10 +980,7 @@ const RenderSurface* GlRenderer::mainSurface()
|
||||||
|
|
||||||
bool GlRenderer::blend(BlendMethod method)
|
bool GlRenderer::blend(BlendMethod method)
|
||||||
{
|
{
|
||||||
if (method == mBlendMethod) return true;
|
mBlendMethod = (method == BlendMethod::Composition ? BlendMethod::Normal : method);
|
||||||
|
|
||||||
mBlendMethod = method;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,7 @@ RenderRegion WgRenderer::region(RenderData data)
|
||||||
|
|
||||||
bool WgRenderer::blend(BlendMethod method)
|
bool WgRenderer::blend(BlendMethod method)
|
||||||
{
|
{
|
||||||
mBlendMethod = method;
|
mBlendMethod = (method == BlendMethod::Composition ? BlendMethod::Normal : method);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue