Skip to content

test(compositor): measure the Linux cursor trail over a one-frame shutter - #684

Closed
EtienneLescot wants to merge 1 commit into
mainfrom
fix/compose-linux-cursor-trail
Closed

EtienneLescot wants to merge 1 commit into
mainfrom
fix/compose-linux-cursor-trail

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

`compose_linux_trainee_de_curseur` fails on main since 34b2e58 bounded the cursor shutter to one frame (`trail_dt = blur01 / FPS`). The test still assumed an 8/60 s trail, so its measurement window was empty.

Change

  • The cursor moves at 8 cx/s, so the one-frame trail spans ~128 px.
  • The window sits between the current sprite and the oldest copy (x 670..738). Threshold 1700 of 2856 px.
  • Comments updated to the one-frame shutter.

Verified under WSL with lavapipe (local `Gpu::create_auto` patch, `OPENSCREEN_LINUX_COMPOSE=1`)

  • 0834a66: `sur le trajet=0`, fails.
  • This branch: `sur le trajet=2856 bande miroir=0`, passes.

Not in scope: on lavapipe, `annotation_flou_et_mosaique`, `flou_de_velocite_ecran` and `sans_camera_ne_dessine_pas_de_vignette` fail too, identically before and after this change.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Improved validation of cursor trails and motion-blur rendering on Linux.
    • Updated test timing and visual measurement criteria to better reflect single-frame blur behavior.
    • Refined pixel-based assertions for more accurate detection of rendered trail output.

…tter

plan_cursor bounds the cursor motion-blur shutter to one frame (trail_dt = blur01 / FPS) since 34b2e58, but compose_linux_trainee_de_curseur still assumed an 8/60 s trail (~256 px at 960 wide). The trail is now ~32 px at that speed, hidden under the 51 px sprite, so the measurement window was empty and the opt-in test failed on main.

Move the cursor four times faster so one frame spans ~128 px, and measure between the oldest copy and the current sprite (x 670..738). Comments now describe the one-frame shutter.
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 48269fb4-87df-4935-a111-6555a6339df3

📥 Commits

Reviewing files that changed from the base of the PR and between 0834a66 and a994c37.

📒 Files selected for processing (1)
  • crates/compositor/tests/compose_linux.rs

Included review availability: Your plan provides up to 8 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Linux compositor cursor-trail test now models a one-frame shutter. It uses a faster cursor track, an earlier sample time, shifted measurement windows, and a lower green-pixel threshold.

Changes

Cursor trail test retuning

Layer / File(s) Summary
Retune cursor trail timing and validation
crates/compositor/tests/compose_linux.rs
The test track and sample time use compressed timing. Measurement windows, comments, and the green-pixel assertion threshold match the one-frame trail geometry.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to a994c

The cursor-trail test changes are internally consistent with the one-frame shutter and do not present a merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the test failure, the updated measurement values, and verification results. However, it does not follow the required template and omits the Summary, Related issue, Type of cha… Add the missing template sections. Complete the applicable checkboxes for change type, release impact, and Linux desktop impact. State whether there is a related issue, indicate when screenshots or video are not applicable, and retain the e…
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: updating the compositor test to measure a one-frame Linux cursor trail.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the test failure, the updated measurement values, and verification results. However, it does not follow the required template and omits the Summary, Related issue, Type of change, Release impact, Desktop impact, and Screenshots / video sections.

Resolution

Add the missing template sections. Complete the applicable checkboxes for change type, release impact, and Linux desktop impact. State whether there is a related issue, indicate when screenshots or video are not applicable, and retain the existing testing details under the Testing section.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.98.0)

Clippy execution failed


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EtienneLescot

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@EtienneLescot

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@EtienneLescot

Copy link
Copy Markdown
Collaborator Author

Intégrée dans integration/chantier-3d (#682) avec ses corrections de revue CodeRabbit ; le chantier avance désormais dans cette seule PR.

@EtienneLescot
EtienneLescot marked this pull request as ready for review September 17, 2026 17:47
EtienneLescot added a commit that referenced this pull request Sep 17, 2026
EtienneLescot added a commit that referenced this pull request Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant