Skip to content

Add DisplayList async platform updates#861

Merged
Kyle-Ye merged 18 commits into
mainfrom
feature/view_render
May 14, 2026
Merged

Add DisplayList async platform updates#861
Kyle-Ye merged 18 commits into
mainfrom
feature/view_render

Conversation

@Kyle-Ye
Copy link
Copy Markdown
Collaborator

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

Summary

  • Add the initial DisplayList view render/update pipeline, including DisplayListViewModel, view cache, platform update paths, and nextUpdate support.
  • Add async platform update plumbing for item, state, geometry, clip, shape, shadow, and child traversal updates.
  • Add shape/mask layer support plus QuartzCore shims for backdrop/private CALayer behavior.
  • Update image/text rendering helpers, geometry utilities, examples, and Xcode schemes for the new render path.
  • Keep Linux builds working by guarding QuartzCore-only APIs and adding a non-CoreGraphics CGPath bounding rect fallback.

@Kyle-Ye Kyle-Ye changed the title Feature/view render Add DisplayList async platform updates May 14, 2026
@Kyle-Ye Kyle-Ye merged commit e708da1 into main May 14, 2026
4 of 8 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/view_render branch May 14, 2026 16:47
@Kyle-Ye Kyle-Ye linked an issue May 14, 2026 that may be closed by this pull request
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 14, 2026

🤖 Augment PR Summary

Summary: This PR introduces an initial DisplayList-driven view render/update pipeline and adds “next update” scheduling support for dynamic content.

Changes:

  • Implements DisplayList view update paths in DisplayListViewPlatform (content/effect kinds, drawing views, shape/shadow, platform views/layers).
  • Adds async platform-update plumbing via AsyncLayer properties and update helpers (geometry, opacity, transforms, clips/masks, shadows).
  • Adds DisplayList.nextUpdate(after:) and per-item nextUpdate propagation to drive scheduled updates.
  • Extends TimelineSchedule with nextEntry and wires Text rendering to compute its next scheduled update.
  • Introduces QuartzCore shims/support for backdrop layers and begins stubbing async updates for filters/images/clips.
  • Updates example schemes and an async render example to support the new render path (including an OpenSwiftUI/SwiftUI import switch).

Technical Notes: Several async update helpers currently return “not supported” (false) to trigger fallback; QuartzCore-only behavior is guarded to keep non-Darwin builds viable.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

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.

do body: (AnyObject) -> Void
) {
#if canImport(Darwin)
let kind = viewInfo.state.kind
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 14, 2026

Choose a reason for hiding this comment

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

Sources/OpenSwiftUICore/Render/DisplayList/DisplayListViewPlatform.swift:2008 — forEachChild no longer has the #if canImport(Darwin) guard, but subviews(_:) / maskView(_:) still call _openSwiftUIPlatformUnimplementedFailure() when QuartzCore isn’t available. If this path executes on Linux/non-QuartzCore platforms it looks like a runtime trap/regression compared to the previous no-op behavior.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

)
if asyncLayer.kind == .mask {
var maskLayer = DisplayList.ViewUpdater.AsyncLayer(
layer: asyncLayer.layer.mask!,
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 14, 2026

Choose a reason for hiding this comment

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

Sources/OpenSwiftUICore/Render/DisplayList/DisplayListViewPlatform.swift:1858 — asyncLayer.layer.mask! is force-unwrapped; if a .mask layer ever exists without a configured mask (or if mask setup lags behind bounds updates), this will crash instead of falling back to a non-async path.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

❌ Patch coverage is 0% with 962 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.69%. Comparing base (a6adab4) to head (bbfe7bf).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...e/Render/DisplayList/DisplayListViewPlatform.swift 0.00% 761 Missing ⚠️
...enSwiftUICore/Render/DisplayList/DisplayList.swift 0.00% 98 Missing ⚠️
Sources/OpenSwiftUICore/Shape/ShapeLayer.swift 0.00% 44 Missing ⚠️
...ore/Render/DisplayList/DisplayListAsyncLayer.swift 0.00% 35 Missing ⚠️
...ces/OpenSwiftUICore/View/Text/Text/Text+View.swift 0.00% 8 Missing ⚠️
...ftUICore/Animation/Timeline/TimelineSchedule.swift 0.00% 5 Missing ⚠️
...tUICore/Shape/ShapeStyle/ShapeStyleRendering.swift 0.00% 5 Missing ⚠️
Sources/OpenSwiftUICore/Shape/MaskLayer.swift 0.00% 3 Missing ⚠️
...ources/OpenSwiftUICore/View/Image/ImageLayer.swift 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #861      +/-   ##
==========================================
- Coverage   26.18%   25.69%   -0.49%     
==========================================
  Files         677      677              
  Lines       46059    46905     +846     
==========================================
- Hits        12059    12053       -6     
- Misses      34000    34852     +852     

☔ 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.

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.

Add OpenSwiftUI renderer

1 participant