-
Notifications
You must be signed in to change notification settings - Fork 583
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: android app crash * chore: try to revert reanimated * chore: try to revert reanimated * chore: revert unrelated changes * bump palette to right version with 3.3.0 reanimated * refresh ios cache * bring back patch reanimated * fix patch reanimated * fix patch reanimated * bring back rosetta
- Loading branch information
Showing
6 changed files
with
109 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
diff --git a/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java b/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java | ||
index e974f8e..f18d93d 100644 | ||
--- a/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java | ||
+++ b/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java | ||
@@ -81,7 +81,7 @@ public class NodesManager implements EventDispatcherListener { | ||
private RCTEventEmitter mCustomEventHandler; | ||
private List<OnAnimationFrame> mFrameCallbacks = new ArrayList<>(); | ||
private ConcurrentLinkedQueue<CopiedEvent> mEventQueue = new ConcurrentLinkedQueue<>(); | ||
- public double currentFrameTimeMs; | ||
+ private double lastFrameTimeMs; | ||
public Set<String> uiProps = Collections.emptySet(); | ||
public Set<String> nativeProps = Collections.emptySet(); | ||
private ReaCompatibility compatibility; | ||
@@ -234,22 +234,27 @@ public class NodesManager implements EventDispatcherListener { | ||
} | ||
|
||
private void onAnimationFrame(long frameTimeNanos) { | ||
- currentFrameTimeMs = frameTimeNanos / 1000000.; | ||
- | ||
- while (!mEventQueue.isEmpty()) { | ||
- CopiedEvent copiedEvent = mEventQueue.poll(); | ||
- handleEvent(copiedEvent.getTargetTag(), copiedEvent.getEventName(), copiedEvent.getPayload()); | ||
- } | ||
+ double currentFrameTimeMs = frameTimeNanos / 1000000.; | ||
+ | ||
+ if (currentFrameTimeMs > lastFrameTimeMs) { | ||
+ // It is possible for ChoreographerCallback to be executed twice within the same frame | ||
+ // due to frame drops. If this occurs, the additional callback execution should be ignored. | ||
+ lastFrameTimeMs = currentFrameTimeMs; | ||
+ while (!mEventQueue.isEmpty()) { | ||
+ CopiedEvent copiedEvent = mEventQueue.poll(); | ||
+ handleEvent(copiedEvent.getTargetTag(), copiedEvent.getEventName(), copiedEvent.getPayload()); | ||
+ } | ||
|
||
- if (!mFrameCallbacks.isEmpty()) { | ||
- List<OnAnimationFrame> frameCallbacks = mFrameCallbacks; | ||
- mFrameCallbacks = new ArrayList<>(frameCallbacks.size()); | ||
- for (int i = 0, size = frameCallbacks.size(); i < size; i++) { | ||
- frameCallbacks.get(i).onAnimationFrame(currentFrameTimeMs); | ||
+ if (!mFrameCallbacks.isEmpty()) { | ||
+ List<OnAnimationFrame> frameCallbacks = mFrameCallbacks; | ||
+ mFrameCallbacks = new ArrayList<>(frameCallbacks.size()); | ||
+ for (int i = 0, size = frameCallbacks.size(); i < size; i++) { | ||
+ frameCallbacks.get(i).onAnimationFrame(currentFrameTimeMs); | ||
+ } | ||
} | ||
- } | ||
|
||
- performOperations(); | ||
+ performOperations(); | ||
+ } | ||
|
||
mCallbackPosted.set(false); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,10 @@ | |
dependencies: | ||
core-js "3" | ||
|
||
"@artsy/[email protected].30": | ||
version "13.2.30" | ||
resolved "https://registry.yarnpkg.com/@artsy/palette-mobile/-/palette-mobile-13.2.30.tgz#5fdd580f3b94c54a3416d1b090043dec1a6ab828" | ||
integrity sha512-SitUeGcuH/nvMZcc2XXBNY9szhIeBIZGwouaYEBO2kn3tW4ClZ0vSedq6qLCzBE48SuEWyCI8ej2CQR08t93Fw== | ||
"@artsy/[email protected].31": | ||
version "13.2.31" | ||
resolved "https://registry.yarnpkg.com/@artsy/palette-mobile/-/palette-mobile-13.2.31.tgz#d927c080677edc66e6edbf53119974e7551f0bd9" | ||
integrity sha512-V/51D8SO7kBWIZn134Hn3ZDNm12rvung3xYt7F1Yoepw/1+8GnOagOtOjAf6eWlkZTWlbP+xbVW8fOWo1Nv2nQ== | ||
dependencies: | ||
"@artsy/palette-tokens" "^6.0.3" | ||
"@shopify/flash-list" "^1.6.4" | ||
|
@@ -12692,10 +12692,10 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/react-native-reanimated-zoom/-/react-native-reanimated-zoom-0.3.3.tgz#99161310c398b2d4220e75ce1d9b76eb075bf3f6" | ||
integrity sha512-naeMV19218OsVOAw7jq45mZGxcSgvcn5xAJlXep27R0IBo/fqpLlLuXKK2nyCXyLzuIPwgqS3O+LUMcTd2L5Gg== | ||
|
||
react-native-reanimated@3.6.3: | ||
version "3.6.3" | ||
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.6.3.tgz#859cf2320e37c80e3a21e19db24f82c34d6d3ded" | ||
integrity sha512-2KkkPozoIvDbJcHuf8qeyoLROXQxizSi+2CTCkuNVkVZOxxY4B0Omvgq61aOQhSZUh/649x1YHoAaTyGMGDJUw== | ||
react-native-reanimated@3.3.0: | ||
version "3.3.0" | ||
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.3.0.tgz#80f9d58e28fddf62fe4c1bc792337b8ab57936ab" | ||
integrity sha512-LzfpPZ1qXBGy5BcUHqw3pBC0qSd22qXS3t8hWSbozXNrBkzMhhOrcILE/nEg/PHpNNp1xvGOW8NwpAMF006roQ== | ||
dependencies: | ||
"@babel/plugin-transform-object-assign" "^7.16.7" | ||
"@babel/preset-typescript" "^7.16.7" | ||
|
@@ -13989,16 +13989,7 @@ string-natural-compare@^3.0.1: | |
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" | ||
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== | ||
|
||
"string-width-cjs@npm:string-width@^4.2.0": | ||
version "4.2.3" | ||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" | ||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== | ||
dependencies: | ||
emoji-regex "^8.0.0" | ||
is-fullwidth-code-point "^3.0.0" | ||
strip-ansi "^6.0.1" | ||
|
||
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: | ||
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: | ||
version "4.2.3" | ||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" | ||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== | ||
|
@@ -14112,7 +14103,7 @@ stringify-entities@^3.1.0: | |
character-entities-legacy "^1.0.0" | ||
xtend "^4.0.0" | ||
|
||
"strip-ansi-cjs@npm:strip-ansi@^6.0.1": | ||
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: | ||
version "6.0.1" | ||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" | ||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== | ||
|
@@ -14126,13 +14117,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0: | |
dependencies: | ||
ansi-regex "^4.1.0" | ||
|
||
strip-ansi@^6.0.0, strip-ansi@^6.0.1: | ||
version "6.0.1" | ||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" | ||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== | ||
dependencies: | ||
ansi-regex "^5.0.1" | ||
|
||
strip-ansi@^7.0.1: | ||
version "7.0.1" | ||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" | ||
|
@@ -15496,7 +15480,7 @@ word-wrap@^1.2.3, word-wrap@~1.2.3: | |
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.4.tgz#cb4b50ec9aca570abd1f52f33cd45b6c61739a9f" | ||
integrity sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA== | ||
|
||
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": | ||
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: | ||
version "7.0.0" | ||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" | ||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== | ||
|
@@ -15514,15 +15498,6 @@ wrap-ansi@^6.2.0: | |
string-width "^4.1.0" | ||
strip-ansi "^6.0.0" | ||
|
||
wrap-ansi@^7.0.0: | ||
version "7.0.0" | ||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" | ||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== | ||
dependencies: | ||
ansi-styles "^4.0.0" | ||
string-width "^4.1.0" | ||
strip-ansi "^6.0.0" | ||
|
||
wrap-ansi@^8.1.0: | ||
version "8.1.0" | ||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" | ||
|