diff --git a/.rive_head b/.rive_head index 60cc5784..cdccb941 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -9c3da38e31678c3eaccc88857f6b54255e889cee +8666bde87b8ef973ff99d7a285a4b768bdf76aa9 diff --git a/wasm/src/bindings_c2d.cpp b/wasm/src/bindings_c2d.cpp index 4ee5f1e4..8b96b333 100644 --- a/wasm/src/bindings_c2d.cpp +++ b/wasm/src/bindings_c2d.cpp @@ -331,7 +331,7 @@ class C2DFactory : public Factory return rcp(new RadialGradientShader(colors, stops, count, cx, cy, radius)); } - std::unique_ptr makeRenderPath(RawPath& path, FillRule fr) override + rcp makeRenderPath(RawPath& path, FillRule fr) override { val renderPath = val::module_property("renderFactory").call("makeRenderPath"); auto ptr = renderPath.as(allow_raw_pointers()); @@ -363,21 +363,21 @@ class C2DFactory : public Factory } assert(pts - path.points().data() == path.points().size()); - return std::unique_ptr(ptr); + return rcp(ptr); // Adopt this ref without increasing the refcount. } - std::unique_ptr makeEmptyRenderPath() override + rcp makeEmptyRenderPath() override { val renderPath = val::module_property("renderFactory").call("makeRenderPath"); auto ptr = renderPath.as(allow_raw_pointers()); - return std::unique_ptr(ptr); + return rcp(ptr); // Adopt this ref without increasing the refcount. } - std::unique_ptr makeRenderPaint() override + rcp makeRenderPaint() override { val renderPaint = val::module_property("renderFactory").call("makeRenderPaint"); auto ptr = renderPaint.as(allow_raw_pointers()); - return std::unique_ptr(ptr); + return rcp(ptr); // Adopt this ref without increasing the refcount. } rcp decodeImage(Span bytes) override diff --git a/wasm/src/bindings_skia.cpp b/wasm/src/bindings_skia.cpp index 235920dc..322305bf 100644 --- a/wasm/src/bindings_skia.cpp +++ b/wasm/src/bindings_skia.cpp @@ -83,7 +83,7 @@ class WebGLSkiaRenderer : public rive::SkiaRenderer void saveClipRect(float l, float t, float r, float b) { save(); - std::unique_ptr rect(jsFactory()->makeEmptyRenderPath()); + rive::rcp rect(jsFactory()->makeEmptyRenderPath()); rect->moveTo(l, t); rect->lineTo(r, t); rect->lineTo(r, b); diff --git a/wasm/submodules/rive-cpp b/wasm/submodules/rive-cpp index ec21667e..163b2250 160000 --- a/wasm/submodules/rive-cpp +++ b/wasm/submodules/rive-cpp @@ -1 +1 @@ -Subproject commit ec21667efa3254daed1bde504061f2f0566622b0 +Subproject commit 163b2250afe78c2dc38246d04b6eec7a16d3dc4d