Skip to content

Commit

Permalink
Nnnn render update fixes
Browse files Browse the repository at this point in the history
Diffs=
ad1ca22bd5 Nnnn render update fixes (#8527)

Co-authored-by: hernan <[email protected]>
  • Loading branch information
bodymovin and bodymovin committed Nov 9, 2024
1 parent 3ff5ac9 commit a4cee7f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8826406ff178cf3e63341087d1611811cc32ced5
ad1ca22bd5911398018c9a6883e4cba7a1b07c53
1 change: 1 addition & 0 deletions src/artboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ void Artboard::markLayoutDirty(LayoutComponent* layoutComponent)
{
m_host->as<NestedArtboardLayout>()->markNestedLayoutDirty();
}
addDirt(ComponentDirt::Components);
}

bool Artboard::syncStyleChanges()
Expand Down
4 changes: 3 additions & 1 deletion src/layout_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ void LayoutComponent::update(ComponentDirt value)
m_WorldTransform = Mat2D::multiply(parentWorld, transform);
updateConstraints();
}
if (hasDirt(value, ComponentDirt::Path))
if (hasDirt(value,
ComponentDirt::Path | ComponentDirt::WorldTransform |
ComponentDirt::LayoutStyle))
{
updateRenderPath();
}
Expand Down
6 changes: 4 additions & 2 deletions src/nested_artboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,14 @@ bool NestedArtboard::advanceComponent(float elapsedSeconds, AdvanceFlags flags)

auto advancingFlags =
flags | AdvanceFlags::AdvanceNested & ~AdvanceFlags::IsRoot;
m_Artboard->advanceInternal(elapsedSeconds, advancingFlags);
if (m_Artboard->advanceInternal(elapsedSeconds, advancingFlags))
{
keepGoing = true;
}
if (m_Artboard->hasDirt(ComponentDirt::Components))
{
// The animation(s) caused the artboard to need an update.
addDirt(ComponentDirt::Components);
keepGoing = true;
}

return keepGoing;
Expand Down

0 comments on commit a4cee7f

Please sign in to comment.