Skip to content

Add blur filter rendering support - #882

Merged
Kyle-Ye merged 13 commits into
mainfrom
bugfix/osui_blur
May 28, 2026
Merged

Add blur filter rendering support#882
Kyle-Ye merged 13 commits into
mainfrom
bugfix/osui_blur

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented May 28, 2026

Copy link
Copy Markdown
Member

Close #880

Agent Summary

This PR adds the filter plumbing needed for blur rendering in the display-list renderer.

  • Adds a QuartzCore filter bridge and Swift-side conversion from GraphicsFilter into layer filters.
  • Updates display-list merge behavior for filter and transform effects so renderer state tracks the expected requirements.
  • Adds shared UI coverage for blur and variable blur, including a SwiftUI SPI interface entry used by the SwiftUI-backed example and tests.

@github-actions github-actions Bot added area: graphics Color, shape, gradient, image, symbols, and graphics primitives. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. platform: iOS iOS-specific behavior or support. type: feature New API, behavior, platform support, or user-facing capability. labels May 28, 2026
@Kyle-Ye
Kyle-Ye marked this pull request as ready for review May 28, 2026 18:16
@augmentcode

augmentcode Bot commented May 28, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR adds display-list renderer plumbing to support blur (including variable blur) via QuartzCore filters.

Changes:

  • Introduces a CAFilter private bridge (C/ObjC shims) and Swift conversions from GraphicsFilter to layer filter arrays.
  • Moves/centralizes graphics-related conversion helpers into a new GraphicsConversions module file (e.g., blend mode + frame-rate range utilities).
  • Updates display-list merge behavior for effects (filters/transforms/groups) so renderer state and view requirements better reflect actual rendering needs.
  • Adds snapshot UI coverage for blur and variable blur, plus a small shared example view used by tests.
  • Extends the SwiftUI SPI interface to expose View.variableBlur(maxRadius:mask:opaque:) on supported OS versions.

Technical Notes: Filter application now routes through CoreViewSetFilters using CAFilter instances built from GraphicsFilter, and group-name handling is updated for backdrop grouping.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread Sources/OpenSwiftUI_SPI/Shims/QuartzCore/CAFilterPrivate.m
Comment thread Sources/OpenSwiftUI_SPI/Shims/QuartzCore/CAFilterPrivate.m
@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 67 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.78%. Comparing base (aa8f2c0) to head (049150d).

Files with missing lines Patch % Lines
...Core/Render/DisplayList/DisplayListViewModel.swift 0.00% 33 Missing ⚠️
...urces/OpenSwiftUICore/Graphic/GraphicsFilter.swift 0.00% 32 Missing ⚠️
.../OpenSwiftUICore/Graphic/GraphicsConversions.swift 0.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (aa8f2c0) and HEAD (049150d). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (aa8f2c0) HEAD (049150d)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #882       +/-   ##
===========================================
- Coverage   26.95%   13.78%   -13.17%     
===========================================
  Files         678      639       -39     
  Lines       47144    41357     -5787     
===========================================
- Hits        12706     5700     -7006     
- Misses      34438    35657     +1219     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye
Kyle-Ye merged commit e525d94 into main May 28, 2026
5 of 10 checks passed
@Kyle-Ye
Kyle-Ye deleted the bugfix/osui_blur branch May 28, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Color, shape, gradient, image, symbols, and graphics primitives. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. platform: iOS iOS-specific behavior or support. type: feature New API, behavior, platform support, or user-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blur filter is not applied in OpenSwiftUI View Renderer

1 participant