334 Commits

Author SHA1 Message Date
bodymovin
d920ee0efd fix(scripting): search first parent transform component to build scri… (#11443) 99ca3a30cc
fix(scripting): search first parent transform component to build script node

feature: modulate opacity (#11427) 128d9d61e0
* feature: modulate opacity

* fix: clang-format

* fix: rust renderer has a no-op modulateOpacity

* fix: no-op modulateOpacity for canvas android

* feature: modulate opacity on android canvas

* fix: rcp ref

* fix: missing override

* fix: gms

* fix: make flutter_renderer match cg one

* fix: josh pr feedback

* fix: remove CG transparency layer

* fix: save modulated gradient up-front

* fix: store only one gradient ref

* fix: remove specific constructor

* fix: use GradDataArray!

* fix: expose currentModulatedOpacity

* fix: cg_factory modulated opacity value

* fix: modulate negative opacity test

* fix: verify double modulate negative also clamps

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: hernan <hernan@rive.app>
2026-01-13 01:13:05 +00:00
csmartdalton
7f3d8d96bf build: Fix premake5 build on macOS Sequoia (#10263) b4298b861b
It looks like the premake5 "v5.0.0-beta3" tag isn't compatible with
Sequoia 15.4.1. Bump our tag to v5.0.0-beta7 and update the deprecated
features we had been using.

Also fix the script to rebuild if the premake5 binary doesn't exist.
Before it only checked if the parent "premake-core" directory existed,
so if a build had failed previously, build_rive.sh would fail forever
without ever attempting to build premake5 again.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-07-31 00:27:07 +00:00
mjtalbot
9064f36eb9 chore: update thumbnailer for new rive building set-up 9fd4961e9b
Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2025-07-15 20:58:14 +00:00
blakdragan7
237f2c8d30 feat(Image sampler filters) Adds Image filter options for rendering images (#9309) 930facea3f
* added filter type to draw batch

* c++ implementation of ImageSamplerOptions

* image sampler options now pushes correct for RiveRenderPaint

* wip

* OpenGL uses correct sample options

* now only one filter option that accounts for mip map

* d3d now uses sampler states options

* better way to get the filter option

* added mirror and inverse mirror options

* started using helper functions for retreiving sampler optiojnhs

* workaround for vulkn semaphore issue

* wip

* added filter type to draw batch

* c++ implementation of ImageSamplerOptions

* image sampler options now pushes correct for RiveRenderPaint

* wip

* OpenGL uses correct sample options

* now only one filter option that accounts for mip map

* d3d now uses sampler states options

* better way to get the filter option

* added mirror and inverse mirror options

* started using helper functions for retreiving sampler optiojnhs

* workaround for vulkn semaphore issue

* wip

* undo deleting empty descriptor

* properly packed image options

* removed uneeded checks

* more unit tests

* unreal image_filter_options integration, gm for image filters

* properly implement new draw functions for cgrender

* finish mege conflicts

* merge vulkan sampler options

* cherry-picked vulkan imp into branch

* initial metal

* clang-format

* d3d12 image filter options

* fixed d3d

* clang-format

* fixed mip filter for metal

* made every filter option act as similiar as possible

* addressed pr changes

* fixed tests

* empty commit to fix github

* fix: webgl renderers

* started addressing PR comments

* metal change for pr

* more pr stuff

* final PR address

* shader update per PR request

* rhi updat e

* added gm requested in pr

* made d3d12 work with more then 2000 sampler changes per flush

* pr comments

Co-authored-by: Chris Dalton <chris@rive.app>
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
Co-authored-by: Luigi Rosso <luigi.rosso@gmail.com>
2025-05-29 05:36:59 +00:00
mjtalbot
0961629f0b fix: skia loses the fill type after a rewind (#9741) 8f5a30ac7c
Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2025-05-21 08:37:31 +00:00
luigi-rosso
7f971fba3c Add RenderPath::addRawPath
Addresses this issue: https://2dimensions.slack.com/archives/C07VD44ASE5/p1739456802968219

Rive's RenderPath steals the memory for the RawPath the runtime builds, which is usually fine apart from cases where we expect to use the RawPath after drawing with it. For example, with inner feather we want to be able to compute the bounds of the RawPath after it has been drawn. If during animation a user turns on inner feathering on a path which has not changed recently, which need to be able to compute its bounds, we can't if the RawPath is now gone.

This also can happen with trim paths and dash paths which are re-trimmed/dashed after having being rendered a few frames. Right now we force rebuild the whole path to re-trim it because we lose the RawPath.

This PR allows the ShapePaintPath to hold on to its RawPath by adding RenderPath::addRawPath. This is optimized memory usage but not having the runtime need to re-alloc the RawPath whenever it animates, but it means we're further from making RenderPaths immutable.

For the future: It'd be good to chat about a long term solution that can accommodate all goals of allocating less memory (prior to this change we were re-allocating RawPath memory every frame when animating), not rebuilding paths as often, and still allow for immutability.

Diffs=
9058a3fdad Add RenderPath::addRawPath (#9038)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-02-14 21:23:43 +00:00
csmartdalton
5192aa33d5 feather v1
Diffs=
7ed60faf76 Vector feathering v1! (#8799)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-01-18 00:41:35 +00:00
csmartdalton
4356a5c53d Add FillRule::clockwise to the runtime
Diffs=
11d4e46498 Add FillRule::clockwise to the runtime (#8786)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-12-20 23:45:02 +00:00
dskuza
a629422a34 Support supplying mobile fallback fonts by style with caching
This pull request builds on top of fallback font support on iOS by including the ability to provide fallback fonts based on the styling of the missing character. Currently, the style information only contains weight. This weight is grabbed by calling `getAxisValue`. According to Luigi, this is a linear search, so perhaps there's room for a performance optimization later on.

There is one lower-level C++ change: `gFallbackProc` returns the font for the missing character, in addition _to_ the missing character (as a second parameter). This font will be used to generate the requested styling within the iOS runtime.

This adds a new class property to `RiveFont`: `fallbackFontCallback` (whose name I'm open to changing). This is a block (i.e closure) that will be called when a fallback font is requested. It supplies the styling of the missing character so that, for example, different fonts can be used based on the weight of the missing character. For example usage, see `SwiftFallbackFonts.swift`. This provider is what's used under-the-hood, and utilizes the pre-existing `fallbackFonts` class property

The "trickiest" bit here is the caching. NSDictionary requires equatable / hashable types as keys, and we want to minimize additional generation of a Rive font, so we cache any used fonts in a wrapper type, used as the value. When new fallback fonts are provided, either directly or when a new provider block is set, the cache will be reset. Once the weight is determined, generating the right key is as simple as calling the right initializer, and when set, generating the right value is simple as calling the right initializer with the created Rive font.

Finally, `RiveFactory` was getting a little bloated, so I did a little file cleanup.

This pull requests also includes Android support from #8621

Diffs=
7986d64d83 Support supplying mobile fallback fonts by style with caching (#8396)

Co-authored-by: David Skuza <david@rive.app>
Co-authored-by: Umberto <usonnino@gmail.com>
Co-authored-by: Umberto Sonnino <umberto@rive.app>
2024-11-27 16:50:58 +00:00
blakdragan7
c719ce1cc4 Deterministic lite rtti
Made lite rtti now use compile time hashes that use the name of the class with rtti enabled as the hash string.

Every use of rtti now needs to be a macro. but other then that, usage of lite rtti is unchanged.

Diffs=
2be44a0f45 Deterministic lite rtti (#8349)

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2024-10-18 02:39:00 +00:00
csmartdalton
163f1beef3 Drop the ColumnLimit to 80 for clang-format
This gives better support for smaller screens and side-by-side windows.

Also standardize the formatting check on GitHub on version 17.

Diffs=
e52e9fff29 Drop the ColumnLimit to 80 for clang-format (#8320)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-10-11 19:22:48 +00:00
mjtalbot
4d8dffb2e1 bump premake
Diffs=
bc6010b6e bump premake (#8120)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2024-09-11 09:02:32 +00:00
csmartdalton
edcc1114cb Unlink skia from goldens
Also delete TestingWindow::Renderer (it's always tied to the TestingWindow subclass now), and delete the Skia renderers. This drastically speeds up link times.

Diffs=
9b755ed5b Unlink skia from goldens (#7991)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-08-29 20:45:44 +00:00
rivessamr
a8b7f00bed iOS images unpremult SIMD support
Support for SIMD instructions for unpremult

First checkin, using rive::int16x4 instructions : 1 pixel at a time
Further checkin, using rive::int16x4 instructions : 2 pixels at a time
Last checkin, avoid computation when opaque pixels (assume there will be enough opaque pixels to warrant this)

Thanks to Chris for the SIMD instructions usage in rive

More checkins: move the decode and unpremult to the rive decoder - this requires modifications to build files. The benefits are we are now running tests on this path. However, there are some issues with decoding two images for tests:

"../../test/assets/bad.jpg" ... Apple Preview app cannot open this image, however, the current test says that it should be not null
And
"../../test/assets/bad.png", Apple Preview app can load this images, however, the current test says that it should be null

Diffs=
e992059d6 iOS images unpremult SIMD support (#7875)

Co-authored-by: rivessamr <suki@rive.app>
2024-08-21 18:29:40 +00:00
csmartdalton
725788de33 Add Xcode support to build_rive.sh
Add an "xcode" option that generates and builds an xcode workspace.

Add -Wshorten-64-to-32 to non-Xcode builds and fix more warnings.

Diffs=
f0da6a7a0 Add Xcode support to build_rive.sh (#7780)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-08-08 16:24:27 +00:00
philter
60ca97d3a4 Add yoga to thumbnail generator build
Diffs=
09ccc9ebb Add yoga to thumbnail generator build (#7494)

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2024-06-27 18:26:02 +00:00
luigi-rosso
6f75d8b6cf Fix GL rendering with URP.
@HayesGordon this basically boils down to making sure we use our new TextureHelper.Descriptor when generating a RenderTexture to ensure we're using the right internal GraphicsFormat. The RenderTexture takes a high-level format that Unity then tries to map to a compatible native one. We bypass that by explicitly setting which Texture Format we want, which we can tweak based on backend if necessary.

Diffs=
353cf349b Fix GL rendering with URP. (#6535)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2024-01-31 17:28:21 +00:00
luigi-rosso
bf1e8f8eff fix viewer build
Diffs=
a8c86e949 fix viewer build (#6527)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-01-27 22:20:31 +00:00
luigi-rosso
3255a2aeb2 Lua formatter
Format all our lua scripts with Stylua

https://www.notion.so/rive-app/Formatters-be8845abbca34e39b5d4c212b2437b3f?pvs=4

Diffs=
858215cc4 Lua formatter (#6525)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2024-01-26 23:51:01 +00:00
csmartdalton
11084a7167 Reorganize premake
Diffs=
b8875ef31 Reorganize premake (#6522)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2024-01-26 21:20:44 +00:00
luigi-rosso
80c037c2d7 Audio engine
Adds an audio engine abstraction (implemented with miniaudio) in Rive. We can selectively replace it with other abstractions later if we find miniaudio isn't well suited everywhere but I'm confident it will be based on flexibility with getting it working in the recorder.

Adds audio support in:

- packages/rive_common
  - WASM: rive_audio_wasm.dart
  - FFI: rive_audio_ffi.dart
- packages/runtime
- packages/recorder

Subsequent PR will add support in:

- packages/rive_unity
  - This is getting meaty enough...
- packages/rive_flutter
  - This requires publishing rive_common so I want to make sure this is reviewed and accepted before publishing
  - I'd also prefer to merge layout constraints into rive_common before this lands.

Editor features:
- Updated preview window:
<img width="248" alt="CleanShot 2024-01-15 at 14 44 31@2x" src="https://github.com/rive-app/rive/assets/454182/a9588be6-8370-4e22-ab32-af1e9ed71183">

- Preview waveforms in the timeline:
<img width="651" alt="CleanShot 2024-01-15 at 14 44 53@2x" src="https://github.com/rive-app/rive/assets/454182/2710667f-838f-483d-9647-e2bcb9e0237a">

- Subsequent PR will also use threads in web editor build (currently uses a time/frame based decoder to offload ui). I can't do that until I can verify the Shared Memory access is granted once rive_common lands in pub.dev and then we can push to UAT.

Diffs=
73bf11db3 Audio engine (#6454)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2024-01-23 04:11:42 +00:00
bodymovin
ee7a0aedad default to skia branch for commit hash in cache helper
Diffs=
dcbe806b0 default to skia branch for commit hash in cache helper (#6432)

Co-authored-by: hernan <hernan@rive.app>
2024-01-11 15:17:30 +00:00
csmartdalton
163b2250af Convert RenderPath/CommandPath and RenderPaint to refcounted objects
Diffs=
8666bde87 Convert RenderPath/CommandPath and RenderPaint to refcounted objects (#6395)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2023-12-27 22:45:06 +00:00
bodymovin
7e5dc85ce9 use skia directly from skia repository for recorder
We decided to use skia from Skia's original repository for the recorder in order to take advantage of some fixes that have been done.
We are using version m113, because newer versions change the API significantly, and it wasn't worth the effort.
Eventually, we'll want to use our renderer for this.

Diffs=
ee0a1ee5d use skia directly from skia repository for recorder (#6359)

Co-authored-by: hernan <hernan@rive.app>
2023-12-21 12:25:19 +00:00
bodymovin
692a33c326 add support for svg export
add support to export svgs using Skia SkSVGCanvas

Diffs=
f8004f31e add support for svg export (#6166)

Co-authored-by: hernan <hernan@rive.app>
2023-12-19 17:55:54 +00:00
csmartdalton
94d378d055 Add a "lite_rtti" utility and use it with Render objects
We need to be more robust if a user tries to use mismatched factories and renderers. This PR creates a simple "lite_rtti" utility and applies it to every Render object. The renderers now abort early instead of crashing if they are given a Render object for the wrong renderer.

Diffs=
c357e7aa7 Add a "lite_rtti" utility and use it with Render objects (#6311)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2023-12-08 02:57:31 +00:00
luigi-rosso
911b1631b8 Ios out of band
few bits to sort out
- [x] make our mix of simulator/emulator consistent, settling on emulator
- [x] passing the factory in works great for just in time asset decoding, but its not amazing when you want to decode ahead of time.
- [x] couple of places left to pass this function signature through. (Question) is there a neater way to get this done, feels a bit like we are going back to parameter explosion a bit?
- [x] should do a few examples, i think the complexity grows quite a bit in this one as you add caching, or callbacks
- [x] should get the cached images/fonts to draw on init as well, either warming up cache, or jitting
- [x] examples loading assets from the bundle (also there seem to be actual asset things too? should we use those?!)
- [x] add test
- [x] re-add "preview" project & rev the preview project once this has been deployed. (do this after new ios deploy)
- [x] fix up race condition (see comment)

https://github.com/rive-app/rive/assets/1216025/2c14330f-e8a4-481b-bc27-4807cabe3b82

(simple example, both swift ui and standard)

![CleanShot 2023-11-20 at 16 54 59](https://github.com/rive-app/rive/assets/1216025/a71e207c-30ad-44dd-9e4b-ad7431b22186)

Diffs=
fabb7f97f Ios out of band (#6232)

Co-authored-by: Gordon Hayes <pggordonhayes@gmail.com>
Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-12-05 21:21:22 +00:00
luigi-rosso
71217cedd3 Disable d3d blend state during PLS flush
Diffs=
fdad66136 Disable d3d blend state during PLS flush (#6254)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Co-authored-by: Luigi Rosso <luigi.rosso@gmail.com>
Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-11-17 22:10:03 +00:00
mjtalbot
04de4710ca Outofbandcache
Ok, got this passing testes, which I guess is a step in the right direction.

Before changing unique pointers to rcp, we could only use an image once, as soon as we assigned a new image, the old image would get garbage collected. (this is the actual problem we are trying to solve)

This "solves" the problem and  allows us to add images to a cache in wasm, and then cycle through the cache, swapping out the render image to be displayed for a given fileAsset. We can replace images & fonts on the fly this way.

Problems:
1. overwriting ref & unref in RenderImage, shows that is being reffed and un-reffed constantly (when viewing the attached file with the viewer). Is that expected? doing something similar for Font does not show up the same. I suspect this is related to how we use images when it comes to rendering, just figured i'd check
2. We dont seem to "leak" anything as detectable by our tests, which is good, but our wasm examples show that neither our fonts nor our render images get collected. presumably thats because we would need to manually tell wasm via js that we want to let go of an image?

Also @csmartdalton @umberto-sonnino & @luigi-rosso  it would be great to see what else is concerning.

example file

[just_a_box_with_a_tree.riv.zip](https://github.com/rive-app/rive/files/13042414/just_a_box_with_a_tree.riv.zip)

Diffs=
1506b069c Outofbandcache (#6049)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-10-26 07:56:22 +00:00
csmartdalton
562ace42e5 Add options to build with rtti and exceptions
Some systems we want to integrate with expect these features.

Diffs=
d65b239c5 Add options to build with rtti and exceptions (#6121)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2023-10-23 16:35:55 +00:00
csmartdalton
f7758ca24c Fission the CG and Skia renderers
Diffs=
c63346b93 Fission the CG and Skia renderers (#6071)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2023-10-12 08:18:52 +00:00
mjtalbot
c21247a0eb Add out of band loading to rive-wasm
Draft, as there's a quite a few bits to do, but would be neat to get thoughts on it

it "works" but there are questions.

- [x] clean up commits a bit
- [x] pull out cdn stuff to pr that alone & unblock @umberto-sonnino
- [x] make prettier example, i think something with a few images is going to work well
- [x] sort out cpp api for decoding assets. dart lets you set the image, i think cpp needs to do the same. (rather than make it implement decode as it currently does)
- [x] asyncify?! ( we are not doing this at this point)
- [x] make fonts replaceable
- [x] fonts do not replace after rendering/ sometimes async fonts do not get drawn (will tackle this later, need to add artboard referencers to assets so that we know what needs to be made dirty once they are updated)
- [x] fix tests
- [x] add tests
- [x] test webgl
- [x] figure out caching (pushed off for later pr)

example looks a bit like this:

https://github.com/rive-app/rive/assets/1216025/98bc1eaf-6076-44d2-93ca-a9cc8ea42f9e

but it can look like this if the fonts do not load properly

![CleanShot 2023-09-26 at 15 52 56](https://github.com/rive-app/rive/assets/1216025/c8e3f06c-2ef4-4e5a-a780-0f764f4d06b3)

(to repro ☝️ set latency to 300ms)

to run.
compile wasm

`cd rive/packages/runtime_wasm/wasm` && `./build_all_wasm.sh`

run the example
`cd rive/packages/runtime_wasm/wasm/examples/out_of_band_example` && `npm start` (oh and `npm install` first)

Diffs=
f95f54140 Add out of band loading to rive-wasm (#6017)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-10-06 08:52:36 +00:00
csmartdalton
98adbc49ce Bump the iOS minimum version to 13 on native builds
Our actual framework targets 14, so this won't have any effect on clients.

This also allows us to quit targeting armv7.

And cut out arm64e as well. Let's keep our release lean.

Diffs=
05e1afaf3 Bump the iOS minimum version to 13 on native builds (#5989)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2023-09-15 07:51:49 +00:00
csmartdalton
a1f5e03451 Make RenderBuffer mappable
Adds map() and unmap() functions to RenderBuffer, and changes Mesh::draw() to map and update the vertex buffer instead of making a new one.

Also refactors RenderBuffer to just be a blob of data as opposed to an array of elements of fixed size and type. Removes the type-specific factory methods for creating RenderBuffers in favor of a single one that just takes a buffer type and buffer size.

Diffs=
06a187288 Make RenderBuffer mappable (#5907)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2023-08-31 03:43:28 +00:00
luigi-rosso
9f62e9a15f Run editor tests on hosted runner.
Testing out the new mac minis.

Diffs=
3ab062dd2 Run editor tests on hosted runner. (#5760)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2023-08-08 18:51:15 +00:00
luigi-rosso
b473fbc775 Build with rive_text from Android Studio
Looks like we use slightly different build scripts locally which weren't building with Rive Text!

Diffs=
5034c8612 Build with rive_text from Android Studio (#5681)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2023-07-27 18:34:00 +00:00
mjtalbot
e8904a48e6 update thumbnailer for text
- [x] worked for macos build.
- [x] worked for docker build.

Diffs=
be33bd1b1 update thumbnailer for text (#5667)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-07-26 14:40:32 +00:00
csmartdalton
c09400e084 Don't use the '-g' buildoption in premake
We should use `symbols 'On'` instead, which is more compatible with
non-clang, non-gcc build systems, like Visual Studio.

Diffs=
db5688c4a Don't use the '-g' buildoption in premake (#5621)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2023-07-20 04:25:08 +00:00
csmartdalton
06fa79be95 Get more compiling on MSVC
Diffs=
1a271c437 Get more compiling on MSVC (#5547)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2023-07-11 20:46:28 +00:00
umberto-sonnino
cf1b2642e7 Add CMake support for building Android and Catch2 Tests
Diffs=
797fb4cbd Add CMake support for building Android and Catch2 Tests (#5468)

Co-authored-by: Umberto Sonnino <umberto@rive.app>
2023-07-07 13:29:31 +00:00
mjtalbot
73fac9a837 Macos take2
draft because i need to get a todo list together.

Adds macos as a target for our ios runtime! Also adds a macos target for our example (which is a different app completely, very minimalistic right now).

<img width="331" alt="CleanShot 2023-05-17 at 20 32 45@2x" src="https://github.com/rive-app/rive/assets/1216025/7a6cadce-9763-41a3-b1a0-6d067dfc3eca">

macos, macos rosetta, macos (designed for ipad), and ios  all co existing in peace, from the same runtime project

![CleanShot 2023-05-17 at 18 32 04@2x](https://github.com/rive-app/rive/assets/1216025/eead319d-a16b-4098-a7db-d5f033b1ef8f)

todo:
- [x] update build scripts to build supporting macos (gotta do this)
- [x] run formatter
- [x] test out builds in forked version of ios? (gotta do this)
- [ ] one more stab at catalyst? (i think we can try that later...)
- [ ] do we need a more comprehensive example setup for macos (I think we can do this later & try to pull zach's examples in)
- [ ] I think we should restructure the ios project, but i think we can do that after this as well (i just think the folder structure/project structure can do with some work, now that we add macos (and should make room for tvos as well)
- [x] probably got tests to fix
- [ ] there's probably a bunch of looking at errors in the debugger and figuring those out, but i would hope that we can deploy with some warnings here too.

catalyst problem:

we get this error:
and the problem is basically that we can target a specific library for macos, but we need one for macos and one for macos catalyst. they share the same architecture, so i dont think we can lipo them into one file...

we could change the compiled binaries before creating the frameworks I guess though? .. maybe something to try..

`/Users/maxwelltalbot/development/rive/rive/packages/runtime_ios/dependencies/debug/librive_skia_renderer_macos.a(cg_factory.o), building for Mac Catalyst, but linking in object file built for macOS, file '/Users/maxwelltalbot/development/rive/rive/packages/runtime_ios/dependencies/debug/librive_skia_renderer_macos.a' for architecture arm64` basically

Diffs=
a9f8a1c5d Macos take2 (#5258)
2023-05-24 11:14:25 +00:00
csmartdalton
24ea5900a9 Merge sbs_render_and_advance into master
Diffs=
9945a7d2d Merge sbs_render_and_advance into master (#5181)
2023-04-28 19:56:15 +00:00
luigi-rosso
4d9adbf229 Rename reset to rewind.
In profiling Joel we saw that RawPath::reset was causing a lot of re-allocation. We realized the intention of reset in most of Rive code is to actually call rewind, so we renamed it and made other adjustments (like calling RawPath::rewind).

Diffs=
f4046e60b Rename reset to rewind. (#5004)
2023-03-16 21:11:22 +00:00
csmartdalton
8be08bbf3b Generate Android builds directly from premake
Adds a global "setup_compiler.lua" file that configures premake to build for Android. Since premake doesn't support specifying a custom compiler, we hack this using "gccprefix".

Also moves a bunch of duplicated windows setup logic into "setup_compiler.lua".

Diffs=
040a27c1c Generate Android builds directly from premake (#4871)
2023-02-22 20:57:11 +00:00
duncandoit
5c3d6816d1 Runtime macOS - Deployment Setup
This should lay the foundation for deploying runtime changes to the public `rive-macos` repo and publishing SPM/CocoaPod named `RiveMacOS`.

### Files to look at:
- dev/**[mono.sh](1e3469e82c/dev/mono.sh)**
- .github/workflows/**[apply_changes_downstream.yaml](1e3469e82c/.github/workflows/apply_changes_downstream.yaml)**
- .github/actions/setup-downstream/**[action.yml](1e3469e82c/.github/actions/setup-downstream/action.yml)**
- packages/runtime_mac/.github/**
- packages/runtime_mac/scripts/**
- packages/runtime/skia/dependencies/**[make_skia_macos.sh](1e3469e82c/packages/runtime/skia/dependencies/make_skia_macos.sh)**

Diffs=
3039909c2 Update to using deployment workflow similar to ios
2023-02-09 18:13:40 +00:00
duncandoit
3f7a887129 Revert "MacOS Runtime - Update to using deployment workflow similar to ios"
Reverts rive-app/rive#4749

Diffs=
e737ee427 Revert "Update to using deployment workflow similar to ios"
2023-02-01 23:17:53 +00:00
duncandoit
e6e2f57b55 MacOS Runtime - Update to using deployment workflow similar to ios
Relevant files:
- `runtime_macos/scripts` scripts
- `packages/runtime/skia/dependencies/make_skia_macos.sh`
- Github actions
- `mono.sh`

Diffs=
de0e57d55 Update to using deployment workflow similar to ios
2023-02-01 22:13:18 +00:00
csmartdalton
0998d90d88 Build cleanups
* Always use NEON if building for __aarch64__. NEON is required on arm64.

* Apply Windows build options to librive_skia_renderer when the *target* is Windows (not the host). This fixes Windows building for Android.

Diffs=
331ad0d55 Build cleanups
2023-01-26 17:42:52 +00:00
csmartdalton
afce35e127 Use Rive's libpng premake dependency in golden testing
Update the libpng dependency to compile on windows and start using it
for our golden testing instead of Skia's libpng.

This also requires us to begin using the "PNG_PREFIX" feature in our
Skia build so Skia can continue using its internal copy of libpng.

Diffs=
2538229d6 Use Rive's libpng premake dependency in golden testing
2023-01-25 23:59:25 +00:00
csmartdalton
1a4db8761b export MAKE_SKIA_FILE from all top-level scripts that build Skia
Diffs=
de4fe4d71 export MAKE_SKIA_FILE from all top-level scripts that build Skia
2022-12-06 07:15:53 +00:00