* started file asset implementation
* asset loader implemented
* started adding tests
* updated fonts and audio to validate before returning an object.
* audio source and font tests
* added deleted callback tests for audio source and fonts
* fixed compiler issues for non windows clang
* updated cargo checks to latest rive_hb
* msvc maudio does not support mp3. use wav instead
* Updated based on PR comments
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
* started implementing error messages
* send errors to command q as well as print to cerr
* started adding tests for error messages
* started file error tests
* file error tests
* render image error tests
* state machine error tets
* PR suggestion to convert template function to helper class
* prevent mixup for 32 bit platforms
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
* added renderimagehandle and fileLoaded and enumsListe
* coded out lists
* added tests for list
* property subscriptions complete
* Added abililty to fire triggers
* added tests code cov vaught
* better name
* ASAN for unit tests (#9997)
chore: enable asan
* changes requested by PR comments
* addressed PR comment
* enum renames
* feat: add asan for tests
* chore: missed lua file
* chore: remove windows asan for now
* remove extra ref
* update print text
Co-authored-by: Hernan Torrisi <hernantorrisi@gmail.com>
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: Luigi Rosso <luigi.rosso@gmail.com>
In Flutter, due to how the pointer events are captured, using DateTime.now or Stopwatch at the time the StateMachine receives the pointer event does not provide accurate timestamps, thus the calculation of the pointer delta and elapsed time were inaccurate in the editor. For example, while dragging, the relative x/y delta between mouse move events may be steady, but the difference between DateTime.now and the previous now could vary widely, leading to inconsistent scroll behavior.
This PR updates to use the PointerEvent's timeStamp instead which is more representative of when the pointer event was dispatched. We capture the timeStamp and pass it through to both the Dart and C++ ScrollConstraints in order to correctly do the computation.
Co-authored-by: Philip Chung <philterdesign@gmail.com>
Fixes a bug (#9985) where clicking after a scroll could result in continual scrolling when the mouse isn't moved.
Co-authored-by: Philip Chung <philterdesign@gmail.com>
Samplers broke on WebGPU because we didn't have CI testing. Fix the
samplers and set up a CI job to run through the WebGPU tests on Dawn to
ensure we don't break this again.
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
The fuzzer used to only support our null render context. We should also
be fuzzing our graphics backends though. Update the fuzzer to use
TestingWindow and support real GPUs. Also add a null testing window so
the fuzzer can continue using a null render context if chosen.
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
* add support for addInstanceAt in list
* fix istanceAt with index overflow
* fix: advanced triggers for lists
* enable resetting embedded images by passing null
* fix: correctly delete selected data components
Co-authored-by: hernan <hernan@rive.app>
* added viewmodels and started tests
* creating and destroying viewmodels and isntances
* listViewModels
* view model listeners finished
* added bindViewModelInstance
* added more tests
* addressed PR comments
* updated api to not use ViewModelHandles and have a more consice api
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
We were allocating textures for clip, scratch, and coverage even when
PixelLocalStorageType was EXT_shader_pixel_local_storage. This was just
a waste of memory since PLS keeps this data explicit tiled memory.
Don't allocate these textures in EXT_shader_pixel_local_storage mode!
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
fixes: https://github.com/rive-app/rive/issues/9781
Imagine this situation.
1. File1 -> publishes vm1, and a artboard1 that understands vm1
2. File2 -> publishes artboard2 that has a nested artboard of artboard1 (imported from library)
3. File3 -> wants to use artboard2 (from File2), and supply it with vm1's instance.
This should work, which is what this PR does. There are two main sectors of changes
1. I created a library asset manager, and uplifts all caching stuff to the 'file' level instead of on the 'libraryAsset' level. This is because ID's like libraryArtboard.viewModelId need to be able to refer to another libraryAsset. Same goes for viewModel.propertyEnum or propertyViewModel.
2. In runtime_exporter, I'm changing how we add to the fileIndexMapper for library components. Before this PR, I was doing this lazily. E.g. if a nestedArtboard refers to an artboardId that's from the library, I remap that to the actual Artboard's index at the time of write. However, this is getting a bit confusing. I thinnnnk it's safe to just map all LibraryComponents before writing anything.
I also fixed path_fiddle for databinding, which is how I've been inspecting databinding in runtimes.
I added a test for this.
Co-authored-by: Susan Wang <susan@rive.app>
vkutil::Texture2D wraps a VkImage AND a VkImageView so we don't have to
manage both of these objects separately when we just want a simple 2D
texture. It also subsumes TextureVulkanImpl, allowing us to simplify
things further and remove that class.
vkutil::Texture & vkutil::TextureView are renamed to vkutil::Image &
vkutil::ImageView, in order to reflect the fact that they are just very
thin wrappers around VkImage & VkImageView.
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Add a gate to prevent m_dirtyLayout from being modified while it's being iterated. Also adds some additional logging.
Co-authored-by: Philip Chung <philterdesign@gmail.com>