From 6601c93899b34791ec2fdb0645a7682838bd5ba2 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Wed, 28 Apr 2021 14:10:25 +0200 Subject: [PATCH] sw_engine: fixing overlapping masks The buffer to which the mask is rastered is only partially cleared. If the object to which the mask is applied overlaps an area where another mask was used, an erroneous image is generated. The buffer clearing area has been increased to the size of the object to which the mask is applied. --- src/lib/tvgPaint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/tvgPaint.cpp b/src/lib/tvgPaint.cpp index b40b5290..987ddaee 100644 --- a/src/lib/tvgPaint.cpp +++ b/src/lib/tvgPaint.cpp @@ -167,7 +167,7 @@ bool Paint::Impl::render(RenderMethod& renderer) /* Note: only ClipPath is processed in update() step. Create a composition image. */ if (cmpTarget && cmpMethod != CompositeMethod::ClipPath) { - auto region = cmpTarget->pImpl->bounds(renderer); + auto region = smethod->bounds(renderer); if (region.w == 0 || region.h == 0) return false; cmp = renderer.target(region); renderer.beginComposite(cmp, CompositeMethod::None, 255);