React Native Skia janky sync with reanimated values (useSharedValueEffect()) #1003
-
GoalSynchronise the Mental ModalTwo layers absolutely positioned on top of each other. Bottom Layer is the skia Code
ProblemWhilst the above code successfully synchronises the Is there something wrong with my implementation? Note that the same behaviour is observable when the animations are driven by Sync between skia and reanimated values inspired by the skia docs. Mental model of layers inspired by the skia examples My intuition is that the Reproducible examplehttps://github.com/MaxRobertsDear/Glassmorphism PreviewNotice how for the top card (with "Some Title" and "Some description"), the content fall out of sync with the background. It works smoothly if the gesture is slow. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It's possible that, indeed Just to be on the safe side, moving the backDropBlurClipPath out of the render method doesn't change anything? (in case you have some extra render). |
Beta Was this translation helpful? Give feedback.
It's possible that, indeed
useSharedValueEffect
is the bottleneck here. We're currently working on UI thread rendering and after that will look at ways to integrate with RE2 in a way that doesn't involve the JS thread.Just to be on the safe side, moving the backDropBlurClipPath out of the render method doesn't change anything? (in case you have some extra render).
In general clipping operations are expensive, I'm wondering if you can reproduce the issue with a single Rect clip (no rounded corners).
It's definitely a use-case we want to monitor closely.