Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syncing with upstream #429

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4b178b6
cloning animation keys to reduce heap memory
gauchoj Aug 1, 2024
6e4f512
added some peformance improvements
gauchoj Aug 1, 2024
ca96c71
switch benchmark
gauchoj Aug 1, 2024
a857142
implementing club
gauchoj Aug 2, 2024
0434025
implementing world edit
gauchoj Aug 13, 2024
da72b6f
updated dependencies
gauchoj Sep 11, 2024
7b325c7
preparing overlay view to add pause, interval and post match
gauchoj Sep 17, 2024
41ab780
preparing for sync
gauchoj Oct 24, 2024
e2cdb71
Merge branch 'master' into master
gauchoj Oct 24, 2024
0804e51
after merge
gauchoj Oct 24, 2024
45ba276
Update .gitignore
gauchoj Dec 6, 2024
89a24c7
fixed problem with release-mode asset pre loading
gauchoj Dec 12, 2024
8de21eb
reviewing crashlytics
gauchoj Jan 11, 2025
6f992b4
Merge remote-tracking branch 'upstream/master'
gauchoj Jan 28, 2025
bb9d340
looking for performance opportunities in rive-flutter
gauchoj Jan 28, 2025
71eed6a
performance tweaks
gauchoj Jan 28, 2025
c991c0c
using HashSet, HashMap, moving from forEach to loops and avoiding unn…
gauchoj Jan 29, 2025
91997e2
fixed introduced bug (rive-flutter recover routine)
gauchoj Jan 29, 2025
482b70d
tweaking
gauchoj Feb 14, 2025
1b982b7
tweaking
gauchoj Feb 14, 2025
9b9519d
fixing ios startup
gauchoj Feb 14, 2025
e73022d
tweaking rive-flutter
gauchoj Feb 15, 2025
c8c2307
unique list
gauchoj Feb 15, 2025
74c0499
fixed UniqueList & removed KeyPropertyBase.propertyKeyChanged
gauchoj Feb 15, 2025
718f0a3
rive_core_context refactor (start)
gauchoj Feb 15, 2025
3a3bae5
rive_core_context refactor (2b continued)
gauchoj Feb 15, 2025
42e46ec
rive_core_context refactor done
gauchoj Feb 15, 2025
49463da
finding animation loop problem
gauchoj Feb 16, 2025
80540a4
small optimizations
gauchoj Feb 16, 2025
f902d0c
testing commit
gauchoj Feb 16, 2025
ee7cc74
detailed dump for iteration infinite loop
gauchoj Feb 17, 2025
1f4f7c7
logging infinite loop in the animation
gauchoj Feb 18, 2025
8f1db63
small edits
gauchoj Feb 18, 2025
1ddbedc
refactored match controllers lifecycle
gauchoj Feb 19, 2025
b0213b9
memory tuning & tweaking
gauchoj Feb 24, 2025
5bbd274
using a Core.id to store two int values
gauchoj Feb 25, 2025
cda2092
moving coreTypes to static initialization
gauchoj Feb 25, 2025
ca93e6b
testing match animations
gauchoj Feb 26, 2025
10843fb
implemented dynamic closestFrame exactsSecondsTolerance & optimizatio…
gauchoj Mar 5, 2025
01efd79
removing specific rive animations from interpolation interval
gauchoj Mar 6, 2025
c0b6236
UI optimization and setting player icons @ pre match
gauchoj Mar 6, 2025
037489b
for each -> for i
gauchoj Mar 6, 2025
b578f3e
cpu tweaks
gauchoj Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
implementing club
gauchoj committed Aug 2, 2024
commit a8571428d03bb0eed98f9c4b151a5957e058c573
4 changes: 2 additions & 2 deletions lib/src/rive_core/animation/keyed_object.dart
Original file line number Diff line number Diff line change
@@ -111,7 +111,7 @@ class KeyedObject extends KeyedObjectBase<RuntimeArtboard> {
}

/// STOKANAL-FORK-EDIT: iterate properties with a list rather than with a map
late final List<KeyedProperty> _properties = _keyedProperties.values.toList(growable: false);
late final List<KeyedProperty> properties = _keyedProperties.values.toList(growable: false);

void apply(
double time,
@@ -124,7 +124,7 @@ class KeyedObject extends KeyedObjectBase<RuntimeArtboard> {
}
// for (final keyedProperty in _keyedProperties.values) {
/// STOKANAL-FORK-EDIT: iterate properties with a list rather than with a map
for (final keyedProperty in _properties) {
for (final keyedProperty in properties) {
if (keyedProperty.isCallback) {
continue;
}
16 changes: 13 additions & 3 deletions lib/src/rive_core/animation/linear_animation.dart
Original file line number Diff line number Diff line change
@@ -70,13 +70,16 @@ class LinearAnimation extends LinearAnimationBase {
objects.any((element) => _keyedObjects.containsKey(element.id));

bool isObjectKeyed(Core object) => _keyedObjects.containsKey(object.id);

bool removeObjectKeys(Core object) {
var value = _keyedObjects[object.id];
if (value == null) {
return false;
}
bool found = false;
for (final kp in value.keyedProperties) {
// for (final kp in value.keyedProperties) {
/// STOKANAL-FORK-EDIT: iterate properties with a list rather than with a map
for (final kp in value.properties) {
for (final kf in kp.keyframes.toList()) {
kf.remove();
found = true;
@@ -101,6 +104,9 @@ class LinearAnimation extends LinearAnimationBase {
/// Returns the start time of the animation in seconds, considering speed
double get startTime => (speed >= 0) ? startSeconds : endSeconds;

/// STOKANAL-FORK-EDIT: iterate properties with a list rather than with a map
late final List<KeyedObject> _objects = _keyedObjects.values.toList(growable: false);

void reportKeyedCallbacks(
double secondsFrom,
double secondsTo, {
@@ -116,7 +122,9 @@ class LinearAnimation extends LinearAnimationBase {
// Do not report a callback twice if it comes from the "pong" part of a
// "ping pong" loop
if (!isAtStartFrame || !fromPong) {
for (final keyedObject in _keyedObjects.values) {
// for (final keyedObject in _keyedObjects.values) {
/// STOKANAL-FORK-EDIT: iterate properties with a list rather than with a map
for (final keyedObject in _objects) {
keyedObject.reportKeyedCallbacks(
secondsFrom,
secondsTo,
@@ -138,7 +146,9 @@ class LinearAnimation extends LinearAnimationBase {
// ignore: parameter_assignments
time = (time * fps).floor() / fps;
}
for (final keyedObject in _keyedObjects.values) {
// for (final keyedObject in _keyedObjects.values) {
/// STOKANAL-FORK-EDIT: iterate properties with a list rather than with a map
for (final keyedObject in _objects) {
keyedObject.apply(time, mix, coreContext);
}
}
4 changes: 1 addition & 3 deletions lib/src/rive_file.dart
Original file line number Diff line number Diff line change
@@ -355,9 +355,7 @@ class RiveFile {
// TODO: in the next major version add an assert here to make this a
// requirement
if (!_initializedText) {
debugPrint('''Rive: RiveFile.import called before RiveFile.initialize()

Consider calling `await RiveFile.initialize()` before using `RiveFile.import`''');
debugPrint('''Rive: RiveFile.import called before RiveFile.initialize(). Consider calling `await RiveFile.initialize()` before using `RiveFile.import`''');
}

var reader = BinaryReader(bytes);