Skip to content

Animation stutters on Windows desktop, but is smooth on Chrome or MacOS desktop #97334

@caudetgit

Description

@caudetgit

Issue
With the Rive Flutter application, playback with complex animations is smooth on Windows Chrome and MacOS desktop, but noticeable stuttering occurs on Windows desktop. Same build, same project file - the only difference is the build target. I believe Flutter was using Angle to convert OpenGL to DirectX on the fly, which is not as performant as Skia's native DirectX backend. Not sure if this is still the case and/or relevant.

We've reproduced this behavior across a number of Windows desktops, including machines with RTX 3080 graphics cards.

Target Platform: Windows desktop 10+
Devices: windows-x64 (e.g., Microsoft Windows Version 10.0.19044.1466)
Flutter version: Repro'd with 2.8, 2.9 and 2.10.0-0.2.pre

Windows desktop video Pay attention to the rocks, tree and castle on the rotating planet below the knight. As these elements rotate you can see a significant stutter or "hitch" every few frames. You can also see this behavior with the blue vertical playhead line in the animation timeline.

[Note: The video capture software introduced a teensy bit of playback artifacts, but these videos are 99% accurate to the actual application experience.]

Rive_WinDesktop_stuttering.mp4
Windows Chrome video Same computer, version of Rive, account and project file as above, but running in Chrome. Playback is much smoother than the Win desktop.
Rive_Chrome_no_stuttering.mp4
Logs

flutter analyze

info - The value of the local variable 'cubic' isn't used - lib\rive\stage\items\stage_path_vertex.dart:49:11 - unused_local_variable
info - This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: RiveTreeView.scrollController, RiveTreeView.physics - lib\widgets\tree_view\rive_tree_view.dart:5:7 - must_be_immutable
info - The value of the local variable 'tasksApi' isn't used - test\managers\push_event_manager_test.dart:47:23 - unused_local_variable

flutter doctor -v

[√] Flutter (Channel unknown, 2.10.0-0.2.pre, on Microsoft Windows [Version 10.0.19044.1466], locale en-US)
• Flutter version 2.10.0-0.2.pre at C:\Users\chada\Development\flutter
• Upstream repository unknown
• Framework revision 73adb14 (7 days ago), 2022-01-19 17:02:56 -0600
• Engine revision 74b74b1
• Dart version 2.16.0 (build 2.16.0-134.1.beta)
• DevTools version 2.9.2

[!] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\Users\chada\AppData\Local\Android\sdk
X cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.0.4)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.0.32014.148
• Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] VS Code (version 1.63.2)
• VS Code at C:\Users\chada\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.32.0

[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.1466]
• Chrome (web) • chrome • web-javascript • Google Chrome 97.0.4692.99
• Edge (web) • edge • web-javascript • Microsoft Edge 97.0.1072.55

[√] HTTP Host Availability
• All required HTTP hosts are available

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: desktopRunning on desktopc: performanceRelates to speed or footprint issues (see "perf:" labels)customer: productengineflutter/engine related. See also e: labels.perf: speedPerformance issues related to (mostly rendering) speedplatform-windowsBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform team

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions