renderer: Fix paint transformation on scene change

issue: https://github.com/thorvg/thorvg/issues/2958
This commit is contained in:
lpogic 2024-11-16 00:05:03 +01:00 committed by Hermet Park
parent 9869855640
commit 8daf0b7b94

View file

@ -77,7 +77,11 @@ Result Scene::push(unique_ptr<Paint> paint) noexcept
{
auto p = paint.release();
if (!p) return Result::MemoryCorruption;
PP(p)->ref();
P(p)->ref();
//Relocated the paint to the current scene space
P(p)->renderFlag |= RenderUpdateFlag::Transform;
pImpl->paints.push_back(p);
return Result::Success;