Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure RuntimeDecorator #1860

Merged

Conversation

mrousavy
Copy link
Contributor

Part 2 of 3

  • Restructures RuntimeDecorator to use the term "Worklet" instead of "UI", and "React Runtime" instead of "Host Runtime".
  • Move isHostRuntime and isUIRuntime from NativeReanimatedModule to RuntimeDecorator (and make static)

@@ -16,7 +16,7 @@ void MutableValue::setValue(jsi::Runtime &rt, const jsi::Value &newValue) {
}
};

if (module->isUIRuntime(rt)) {
if (RuntimeDecorator::isWorkletRuntime(rt)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that RuntimeDecorator should have such methods. Maybe it will fit better with RuntimeManager?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RuntimeDecorator is the one responsible for marking a runtime a "worklet runtime", why shouldn't it also be exposing a method that can determine this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have convinced me.

@Szymon20000 Szymon20000 merged commit 3155b2b into software-mansion:master Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants