Skip to content

core: Fix bitmap cache updates for animated masks (jitter fix) - #24949

Open
cmdocmd wants to merge 3 commits into
ruffle-rs:masterfrom
cmdocmd:fix-filter-mask-jitter
Open

cmdocmd wants to merge 3 commits into
ruffle-rs:masterfrom
cmdocmd:fix-filter-mask-jitter

Conversation

@cmdocmd

@cmdocmd cmdocmd commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes jitter in stationary filtered content when an animated mask changes bounds.

Mask children are excluded from render bounds so their animation does not shift the bitmap cache origin. Script-visible bounds remain unchanged.

Testing

Adds visual/cache_as_bitmap/animated_mask_filter_bounds, using an existing Ruffle test image and references from Adobe Flash Player 32.

The test covers:

  • Stationary content under oversized animated masks, with ColorMatrix, Hard Light, both effects, or neither.
  • An intentionally moving clipping edge.
  • An intentionally moving bitmap.

It compares traces of bitmap, mask, and container bounds against Flash. Image comparisons at three animation checkpoints and the final state verify that stationary content stays still while clipping and content movement update correctly.

The capture checkpoints have identical visible control positions but different oversized mask bounds, allowing the same Adobe stage reference to be reused.

The test passes with both changes and fails when either change is removed.

Checklist

  • I, a human, have self-reviewed this PR and fully understand the changes within.
  • I have made or updated tests where possible.
  • All of my commits are properly scoped, compile successfully, and pass all tests.
  • This PR does not make sense to split up into smaller PRs.
  • An LLM was involved in the authoring of this code.

@kjarosh kjarosh added A-rendering Area: Rendering & Graphics waiting-on-review Waiting on review from a Ruffle team member T-fix Type: Bug fix (in something that's supposed to work already) labels Oct 18, 2026
@cmdocmd cmdocmd changed the title core: Fix bitmap cache updates for animated masks core: Fix bitmap cache updates for animated masks (jitter fix) Oct 28, 2026
Comment thread core/src/display_object.rs Resolved
Comment thread core/src/display_object/graphic.rs Resolved
@cmdocmd
cmdocmd force-pushed the fix-filter-mask-jitter branch from dbb07be to 56c27a1 Compare November 8, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rendering Area: Rendering & Graphics T-fix Type: Bug fix (in something that's supposed to work already) waiting-on-review Waiting on review from a Ruffle team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants