@shopify/react-native-skia 2.2.13 → 2.2.14

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.
@@ -337,7 +337,6 @@ public:
337
337
  }
338
338
  };
339
339
 
340
- // Add to Drawings.h after existing command structures
341
340
  struct BoxShadowCmdProps {
342
341
  float dx = 0;
343
342
  float dy = 0;
@@ -386,16 +385,17 @@ public:
386
385
  for (size_t i = 0; i < shadowCount; i++) {
387
386
  auto shadowObj =
388
387
  shadowsArray.getValueAtIndex(runtime, i).asObject(runtime);
389
- BoxShadowCmdProps shadow;
390
-
391
- convertProperty(runtime, shadowObj, "dx", shadow.dx, variables);
392
- convertProperty(runtime, shadowObj, "dy", shadow.dy, variables);
393
- convertProperty(runtime, shadowObj, "spread", shadow.spread, variables);
394
- convertProperty(runtime, shadowObj, "blur", shadow.blur, variables);
395
- convertProperty(runtime, shadowObj, "color", shadow.color, variables);
396
- convertProperty(runtime, shadowObj, "inner", shadow.inner, variables);
397
-
398
- shadows.push_back(shadow);
388
+
389
+ // Create shadow directly in vector to avoid copy
390
+ shadows.emplace_back();
391
+ BoxShadowCmdProps &shadow = shadows.back();
392
+
393
+ convertProperty(runtime, shadowObj, "dx", shadow.dx, variables);
394
+ convertProperty(runtime, shadowObj, "dy", shadow.dy, variables);
395
+ convertProperty(runtime, shadowObj, "spread", shadow.spread, variables);
396
+ convertProperty(runtime, shadowObj, "blur", shadow.blur, variables);
397
+ convertProperty(runtime, shadowObj, "color", shadow.color, variables);
398
+ convertProperty(runtime, shadowObj, "inner", shadow.inner, variables);
399
399
  }
400
400
  }
401
401
 
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.13",
11
+ "version": "2.2.14",
12
12
  "description": "High-performance React Native Graphics using Skia",
13
13
  "main": "lib/module/index.js",
14
14
  "react-native": "src/index.ts",