Skip to content

fix(qml): optimize VRAM usage in DankRipple#1691

Merged
bbedward merged 1 commit intoAvengeMedia:masterfrom
higorprado:fix/optimization/ripple-vram-usage
Feb 15, 2026
Merged

fix(qml): optimize VRAM usage in DankRipple#1691
bbedward merged 1 commit intoAvengeMedia:masterfrom
higorprado:fix/optimization/ripple-vram-usage

Conversation

@higorprado
Copy link
Copy Markdown
Contributor

Problem

DankRipple was using layer.enabled + MultiEffect with maskSource for rounded corners. This created offscreen textures for every clickable element with rounded corners (used in 34+ files across the UI), adding 100-300MB VRAM on NVIDIA GPUs.

Solution

Replace the mask-based approach with GPU-native clipping using clip: true on a Rectangle with the corner radius. This is handled natively by the GPU without creating intermediate textures.

Changes

  • Single Rectangle wrapper with clip: root.cornerRadius > 0 and radius: root.cornerRadius
  • Removed: rippleMask Item with layer.enabled
  • Removed: MultiEffect with maskEnabled

Visual Impact

Minimal - the ripple effect works identically. The only theoretical difference is slightly less smooth edges on rounded corners during the ripple animation, which is not noticeable at 10% opacity during the quick animation.

Testing

Tested on NVIDIA GPU, ~100-300MB VRAM reduction.

Replace layer+MultiEffect mask with GPU-native clipping for rounded
corners. The previous approach created offscreen textures for every
clickable element with rounded corners (used in 34+ files across the
UI), adding 100-300MB VRAM on NVIDIA GPUs.

The new approach uses clip: true on a Rectangle with the corner
radius, which is handled natively by the GPU without creating
intermediate textures.

Visual impact: Minimal - the ripple effect works identically.
The only theoretical difference is slightly less smooth edges on
rounded corners during the ripple animation, which is not noticeable
at 10% opacity during the quick animation.

VRAM improvement: Tested on NVIDIA, ~100-300MB reduction.
@Purian23 Purian23 requested a review from bbedward February 15, 2026 17:57
@bbedward bbedward merged commit 13ef1ef into AvengeMedia:master Feb 15, 2026
1 check passed
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.

2 participants