Skip to content

Skip present for hidden viewports on Windows/macOS too - #1

Open
Theanko1412 wants to merge 1 commit into
degenview:mainfrom
Theanko1412:fix/skip-hidden-viewport-present-all-platforms
Open

Theanko1412 wants to merge 1 commit into
degenview:mainfrom
Theanko1412:fix/skip-hidden-viewport-present-all-platforms

Conversation

@Theanko1412

Copy link
Copy Markdown

Summary

  • Skip GPU present for all hidden viewports (not only Wayland).
  • On Windows/macOS, DegenView’s hidden 1×1 root was still presenting every heartbeat; those presents serialized behind mouse-driven frames on the shared device and made the cursor feel ~10 fps sticky while CPU/GPU stayed quiet.
  • UI pass still runs when show_ui is true so deferred children keep ticking.
  • Removes now-unused is_wayland helpers.

Related

Companion app changes: degenview/degenview#733

Test plan

  • With a DegenView build that depends on this crate: open a chart on Windows, move the mouse for 30+ s — should stay snappy after the first seconds
  • Wayland: hidden/minimized viewports still do not remount via present
  • Publish as next degenview-eframe and bump the pin in degenview/degenview

Contributor note

Produced with Cursor (AI-assisted). I am not a Rust developer — please review carefully. Related to the Windows input-latency investigation in degenview#733.

Wayland already skipped painting hidden viewports; on Windows/macOS the hidden
1x1 root kept presenting every heartbeat and serialized behind mouse-driven
frames, so the cursor felt stuck with quiet CPU/GPU. Still run the UI pass when
descendants need it.

Co-authored-by: Cursor <cursoragent@cursor.com>
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