From ae806d379b17ea26d9a98153c22e02c02bb82be3 Mon Sep 17 00:00:00 2001 From: susan101566 Date: Sat, 16 Nov 2024 02:57:58 +0000 Subject: [PATCH] editor: be more mindful of sending dirt recursively when n-slicing A long time ago, I only sent out dirt.nslicer when anything about the vector n-slicer changed. However, this caused clipping paths inside of a vector n-slicer to not update in time. I was worried to miss a spot, so in addition to sending dirt.nslicer, I also sent out dirt.path.. recursively... Then it turns out that if there are texts inside of the n-sliced node, they will also listen to dirt.path, and that caused some performance issues. So now we are back to wanting to send dirt.nslicer, and have places that listen to it calculate things. The way I audited this... I first did a search for all ComponentDirt.path in the Dart codebase: ![image](https://github.com/user-attachments/assets/281df80c-3320-46f2-9ff7-c3ee6e40065a) Then for all of them, I see whether the check occurred in a update() function. If it does, then I added an dirt.nslicer condition too. This was after the first commit. I'm hoping that doing it this way means that the checks are complete, meaning I'm not missing any dirt.nslicer checks. I then commented each out, and see whether something will not update in time. So e.g. if the update is on a layout node, I'd check whether a hug layout node responds to an nsliced node's width/height. (in this case, I don't need the nslicer check, so i removed it). This was the second commit. I'm hoping that doing it this way means all the dirt.nslicer checks are necessary. Then the idea is...if we are doing sth complete and necessary, it's the right amount. Diffs= 1d23ae5782 editor: be more mindful of sending dirt recursively when n-slicing (#8576) --- .rive_head | 2 +- submodules/rive-runtime | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.rive_head b/.rive_head index 0edc9f08..e859f973 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -cc15ffa4f66f77c61ffb549d0d371e711f5d001e +1d23ae578262f2d12b52f0bae387336a00626930 diff --git a/submodules/rive-runtime b/submodules/rive-runtime index 69c1c6e1..9742c2b6 160000 --- a/submodules/rive-runtime +++ b/submodules/rive-runtime @@ -1 +1 @@ -Subproject commit 69c1c6e16589ba4932a71faf2aa159c5bf440717 +Subproject commit 9742c2b60addece96920ea260c5a81b714d5d2a8