@shopify/react-native-skia 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,6 @@ package com.shopify.reactnative.skia;
|
|
2
2
|
|
3
3
|
import android.os.Handler;
|
4
4
|
import android.os.Looper;
|
5
|
-
import android.util.Log;
|
6
|
-
import android.view.Choreographer;
|
7
5
|
|
8
6
|
import com.facebook.jni.HybridData;
|
9
7
|
import com.facebook.proguard.annotations.DoNotStrip;
|
@@ -27,6 +25,8 @@ public class PlatformContext {
|
|
27
25
|
|
28
26
|
private final String TAG = "PlatformContext";
|
29
27
|
|
28
|
+
private final Handler mainHandler = new Handler(Looper.getMainLooper());
|
29
|
+
|
30
30
|
public PlatformContext(ReactContext reactContext) {
|
31
31
|
mContext = reactContext;
|
32
32
|
mHybridData = initHybrid(reactContext.getResources().getDisplayMetrics().density);
|
@@ -105,6 +105,16 @@ public class PlatformContext {
|
|
105
105
|
super.finalize();
|
106
106
|
}
|
107
107
|
|
108
|
+
@DoNotStrip
|
109
|
+
public void raise(final String message) {
|
110
|
+
mainHandler.post(new Runnable() {
|
111
|
+
@Override
|
112
|
+
public void run() {
|
113
|
+
mContext.handleException(new Exception(message));
|
114
|
+
}
|
115
|
+
});
|
116
|
+
}
|
117
|
+
|
108
118
|
// Private c++ native methods
|
109
119
|
private native HybridData initHybrid(float pixelDensity);
|
110
|
-
}
|
120
|
+
}
|
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.7.
|
10
|
+
"version": "1.7.4",
|
11
11
|
"description": "High-performance React Native Graphics using Skia",
|
12
12
|
"main": "lib/module/index.js",
|
13
13
|
"react-native": "src/index.ts",
|