summaryrefslogtreecommitdiffstats
path: root/thirdparty/thorvg/src/renderer/sw_engine/tvgSwRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/thorvg/src/renderer/sw_engine/tvgSwRenderer.cpp')
-rw-r--r--thirdparty/thorvg/src/renderer/sw_engine/tvgSwRenderer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/thirdparty/thorvg/src/renderer/sw_engine/tvgSwRenderer.cpp b/thirdparty/thorvg/src/renderer/sw_engine/tvgSwRenderer.cpp
index 6470089c7c..116c4e8135 100644
--- a/thirdparty/thorvg/src/renderer/sw_engine/tvgSwRenderer.cpp
+++ b/thirdparty/thorvg/src/renderer/sw_engine/tvgSwRenderer.cpp
@@ -446,7 +446,7 @@ bool SwRenderer::renderShape(RenderData data)
}
-bool SwRenderer::blend(BlendMethod method, bool direct)
+bool SwRenderer::blend(BlendMethod method)
{
if (surface->blendMethod == method) return true;
surface->blendMethod = method;
@@ -459,7 +459,7 @@ bool SwRenderer::blend(BlendMethod method, bool direct)
surface->blender = opBlendScreen;
break;
case BlendMethod::Multiply:
- surface->blender = direct ? opBlendDirectMultiply : opBlendMultiply;
+ surface->blender = opBlendMultiply;
break;
case BlendMethod::Overlay:
surface->blender = opBlendOverlay;
@@ -606,7 +606,10 @@ Compositor* SwRenderer::target(const RenderRegion& region, ColorSpace cs)
cmp->w = cmp->compositor->image.w;
cmp->h = cmp->compositor->image.h;
- rasterClear(cmp, x, y, w, h);
+ /* TODO: Currently, only blending might work.
+ Blending and composition must be handled together. */
+ auto color = (surface->blender && !surface->compositor) ? 0x00ffffff : 0x00000000;
+ rasterClear(cmp, x, y, w, h, color);
//Switch render target
surface = cmp;