Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[android][ios] Upgrade @shopify/react-native-skia to 0.1.153 (#19360)
# Why close ENG-6536 # How - [tools] Update react-native-skia.patch - `et uvm -m @shopify/react-native-skia -c 0.1.153` - [NCL] update SkiaScreen example mainly for `useDerivedValue -> useComputedValue` # Test Plan - android unversioned expo go + NCL skia - ios unversioned expo go + NCL skia
- Loading branch information
Showing
110 changed files
with
3,570 additions
and
2,712 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,6 @@ android { | |
externalNativeBuild { | ||
cmake { | ||
path file('CMakeLists.txt') | ||
version '3.10.2' | ||
} | ||
} | ||
|
||
|
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
14 changes: 0 additions & 14 deletions
14
android/vendored/unversioned/@shopify/react-native-skia/android/README.md
This file was deleted.
Oops, something went wrong.
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
12 changes: 7 additions & 5 deletions
12
android/vendored/unversioned/@shopify/react-native-skia/android/cpp/jni/JniLoad.cpp
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
#include "JniPlatformContext.h" | ||
#include "JniSkiaDrawView.h" | ||
#include "JniSkiaPictureView.h" | ||
#include "JniSkiaManager.h" | ||
#include <fbjni/fbjni.h> | ||
#include <jni.h> | ||
|
||
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { | ||
return facebook::jni::initialize(vm, [] { | ||
RNSkia::JniSkiaManager::registerNatives(); | ||
RNSkia::JniSkiaDrawView::registerNatives(); | ||
RNSkia::JniPlatformContext::registerNatives(); | ||
}); | ||
return facebook::jni::initialize(vm, [] { | ||
RNSkia::JniSkiaManager::registerNatives(); | ||
RNSkia::JniSkiaDrawView::registerNatives(); | ||
RNSkia::JniSkiaPictureView::registerNatives(); | ||
RNSkia::JniPlatformContext::registerNatives(); | ||
}); | ||
} |
113 changes: 0 additions & 113 deletions
113
android/vendored/unversioned/@shopify/react-native-skia/android/cpp/jni/JniSkiaDrawView.cpp
This file was deleted.
Oops, something went wrong.
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
68 changes: 68 additions & 0 deletions
68
...vendored/unversioned/@shopify/react-native-skia/android/cpp/jni/include/JniSkiaBaseView.h
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,68 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
|
||
#include <fbjni/fbjni.h> | ||
#include <jni.h> | ||
#include <jsi/jsi.h> | ||
|
||
#include <JniSkiaManager.h> | ||
|
||
namespace RNSkia { | ||
using namespace facebook; | ||
using namespace jni; | ||
|
||
class JniSkiaBaseView { | ||
public: | ||
JniSkiaBaseView(jni::alias_ref<JniSkiaManager::javaobject> skiaManager, | ||
std::shared_ptr<RNSkBaseAndroidView> skiaView) : | ||
_manager(skiaManager->cthis()), | ||
_skiaView(skiaView) {} | ||
|
||
~JniSkiaBaseView() {} | ||
|
||
std::shared_ptr<RNSkManager> getSkiaManager() { return _manager->getSkiaManager(); }; | ||
|
||
protected: | ||
virtual void updateTouchPoints(jni::JArrayDouble touches) { | ||
_skiaView->updateTouchPoints(touches); | ||
} | ||
|
||
virtual void surfaceAvailable(jobject surface, int width, int height) { | ||
_skiaView->surfaceAvailable(surface, width, height); | ||
} | ||
|
||
virtual void surfaceSizeChanged(int width, int height) { | ||
_skiaView->surfaceSizeChanged(width, height); | ||
} | ||
|
||
virtual void surfaceDestroyed() { | ||
_skiaView->surfaceDestroyed(); | ||
} | ||
|
||
virtual void setMode(std::string mode) { | ||
_skiaView->setMode(mode); | ||
} | ||
|
||
virtual void setDebugMode(bool show) { | ||
_skiaView->setShowDebugInfo(show); | ||
} | ||
|
||
virtual void registerView(int nativeId) { | ||
getSkiaManager()->registerSkiaView(nativeId, | ||
_skiaView->getSkiaView()); | ||
} | ||
|
||
virtual void unregisterView() { | ||
getSkiaManager()->setSkiaView(_skiaView->getSkiaView()->getNativeId(), nullptr); | ||
getSkiaManager()->unregisterSkiaView( | ||
_skiaView->getSkiaView()->getNativeId()); | ||
_skiaView->viewDidUnmount(); | ||
} | ||
|
||
private: | ||
JniSkiaManager *_manager; | ||
std::shared_ptr<RNSkBaseAndroidView> _skiaView; | ||
}; | ||
|
||
} // namespace RNSkia |
Oops, something went wrong.