@shopify/react-native-skia 1.5.9 → 1.5.10
Sign up to get free protection for your applications and to get access to all the features.
- package/cpp/rnskia/RNSkPlatformContext.h +1 -2
- package/cpp/rnskia/RNSkView.h +11 -4
- package/lib/commonjs/specs/SkiaDomViewNativeComponent.d.ts +0 -1
- package/lib/commonjs/specs/SkiaDomViewNativeComponent.js.map +1 -1
- package/lib/module/specs/SkiaDomViewNativeComponent.d.ts +0 -1
- package/lib/module/specs/SkiaDomViewNativeComponent.js.map +1 -1
- package/lib/typescript/src/specs/SkiaDomViewNativeComponent.d.ts +0 -1
- package/package.json +1 -1
- package/src/specs/SkiaDomViewNativeComponent.ts +0 -1
package/cpp/rnskia/RNSkView.h
CHANGED
@@ -173,10 +173,17 @@ public:
|
|
173
173
|
void requestRedraw() {
|
174
174
|
if (!_redrawRequested) {
|
175
175
|
_redrawRequested = true;
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
176
|
+
// Capture a weak pointer to this
|
177
|
+
auto weakThis = std::weak_ptr<RNSkView>(shared_from_this());
|
178
|
+
|
179
|
+
_platformContext->runOnMainThread([weakThis]() {
|
180
|
+
// Try to lock the weak pointer
|
181
|
+
if (auto strongThis = weakThis.lock()) {
|
182
|
+
// Only proceed if the object still exists
|
183
|
+
if (strongThis->_renderer) {
|
184
|
+
strongThis->_renderer->renderImmediate(strongThis->_canvasProvider);
|
185
|
+
strongThis->_redrawRequested = false;
|
186
|
+
}
|
180
187
|
}
|
181
188
|
});
|
182
189
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent"],"sources":["SkiaDomViewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\nimport type { ViewProps } from \"react-native\";\n\nexport interface NativeProps extends ViewProps {\n
|
1
|
+
{"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent"],"sources":["SkiaDomViewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\nimport type { ViewProps } from \"react-native\";\n\nexport interface NativeProps extends ViewProps {\n debug?: boolean;\n}\n\n// eslint-disable-next-line import/no-default-export\nexport default codegenNativeComponent<NativeProps>(\"SkiaDomView\");\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAO7F;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GACe,IAAAG,+BAAsB,EAAc,aAAa,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["codegenNativeComponent"],"sources":["SkiaDomViewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\nimport type { ViewProps } from \"react-native\";\n\nexport interface NativeProps extends ViewProps {\n
|
1
|
+
{"version":3,"names":["codegenNativeComponent"],"sources":["SkiaDomViewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\nimport type { ViewProps } from \"react-native\";\n\nexport interface NativeProps extends ViewProps {\n debug?: boolean;\n}\n\n// eslint-disable-next-line import/no-default-export\nexport default codegenNativeComponent<NativeProps>(\"SkiaDomView\");\n"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,yDAAyD;AAO5F;AACA,eAAeA,sBAAsB,CAAc,aAAa,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
"setup-skia-web": "./scripts/setup-canvaskit.js"
|
8
8
|
},
|
9
9
|
"title": "React Native Skia",
|
10
|
-
"version": "1.5.
|
10
|
+
"version": "1.5.10",
|
11
11
|
"description": "High-performance React Native Graphics using Skia",
|
12
12
|
"main": "lib/module/index.js",
|
13
13
|
"react-native": "src/index.ts",
|