@shopify/react-native-skia 2.2.5 → 2.2.6
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.
package/android/CMakeLists.txt
CHANGED
@@ -307,7 +307,7 @@ if(${REACT_NATIVE_VERSION} GREATER_EQUAL 80)
|
|
307
307
|
target_compile_reactnative_options(${PACKAGE_NAME} PRIVATE)
|
308
308
|
else()
|
309
309
|
string(APPEND CMAKE_CXX_FLAGS
|
310
|
-
" -fexceptions -frtti -std=c++${CMAKE_CXX_STANDARD} -Wall -Werror -Wunused-function -Wunused-private-field -Woverloaded-virtual -Wreorder-ctor -Wdelete-non-abstract-non-virtual-dtor -Wmismatched-tags -Wunused-variable -Wpessimizing-move -Wswitch -Wdeprecated-declarations")
|
310
|
+
" -fexceptions -frtti -std=c++${CMAKE_CXX_STANDARD} -Wall -Werror -Wunused-function -Wunused-private-field -Woverloaded-virtual -Wreorder-ctor -Wdelete-non-abstract-non-virtual-dtor -Wmismatched-tags -Wunused-variable -Wpessimizing-move -Wswitch -Wdeprecated-declarations -Werror=deprecated-this-capture")
|
311
311
|
endif()
|
312
312
|
|
313
313
|
# Link
|
@@ -136,7 +136,7 @@ void JniPlatformContext::performStreamOperation(
|
|
136
136
|
static auto method = javaPart_->getClass()->getMethod<jbyteArray(jstring)>(
|
137
137
|
"getJniStreamFromSource");
|
138
138
|
|
139
|
-
auto loader = [
|
139
|
+
auto loader = [=, this]() -> void {
|
140
140
|
jni::ThreadScope ts;
|
141
141
|
jstring jstr =
|
142
142
|
(*jni::Environment::current()).NewStringUTF(sourceUri.c_str());
|
package/cpp/api/JsiSkImage.h
CHANGED
@@ -185,6 +185,9 @@ public:
|
|
185
185
|
}
|
186
186
|
|
187
187
|
JSI_HOST_FUNCTION(readPixels) {
|
188
|
+
#if defined(SK_GRAPHITE)
|
189
|
+
throw std::runtime_error("Not implemented yet");
|
190
|
+
#else
|
188
191
|
int srcX = 0;
|
189
192
|
int srcY = 0;
|
190
193
|
if (count > 0 && !arguments[0].isUndefined()) {
|
@@ -217,16 +220,14 @@ public:
|
|
217
220
|
.asObject(runtime)
|
218
221
|
.getArrayBuffer(runtime);
|
219
222
|
auto bfrPtr = reinterpret_cast<void *>(buffer.data(runtime));
|
220
|
-
|
221
|
-
throw std::runtime_error("Not implemented yet");
|
222
|
-
#else
|
223
|
+
|
223
224
|
auto grContext = getContext()->getDirectContext();
|
224
225
|
if (!getObject()->readPixels(grContext, info, bfrPtr, bytesPerRow, srcX,
|
225
226
|
srcY)) {
|
226
227
|
return jsi::Value::null();
|
227
228
|
}
|
228
|
-
#endif
|
229
229
|
return dest;
|
230
|
+
#endif
|
230
231
|
}
|
231
232
|
|
232
233
|
JSI_HOST_FUNCTION(makeNonTextureImage) {
|
@@ -57,7 +57,7 @@ public:
|
|
57
57
|
|
58
58
|
private:
|
59
59
|
bool performDraw(std::shared_ptr<RNSkCanvasProvider> canvasProvider) {
|
60
|
-
return canvasProvider->renderToCanvas([
|
60
|
+
return canvasProvider->renderToCanvas([=, this](SkCanvas *canvas) {
|
61
61
|
// Make sure to scale correctly
|
62
62
|
auto pd = _platformContext->getPixelDensity();
|
63
63
|
canvas->clear(SK_ColorTRANSPARENT);
|
package/package.json
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
"setup-skia-web": "scripts/setup-canvaskit.js"
|
9
9
|
},
|
10
10
|
"title": "React Native Skia",
|
11
|
-
"version": "2.2.
|
11
|
+
"version": "2.2.6",
|
12
12
|
"description": "High-performance React Native Graphics using Skia",
|
13
13
|
"main": "lib/module/index.js",
|
14
14
|
"react-native": "src/index.ts",
|