-
Notifications
You must be signed in to change notification settings - Fork 65
Rotated view hierarchy is incorrect in OpenSwiftUI View Renderer #878
Copy link
Copy link
Closed
Labels
area: compatibilityCompatibility, availability, legacy support, and cross-version behavior.Compatibility, availability, legacy support, and cross-version behavior.area: hosting-bridgeSwiftUI bridge, UIHosting/NSHosting, representables, and platform host views.SwiftUI bridge, UIHosting/NSHosting, representables, and platform host views.area: renderingDisplayList, render backends, renderer hosts, drawing, and effects.DisplayList, render backends, renderer hosts, drawing, and effects.impact: visual-diffVisual mismatch, screenshot diff, or rendering fidelity issue.Visual mismatch, screenshot diff, or rendering fidelity issue.platform: iOSiOS-specific behavior or support.iOS-specific behavior or support.type: bugSomething is not working correctly.Something is not working correctly.
Metadata
Metadata
Assignees
Labels
area: compatibilityCompatibility, availability, legacy support, and cross-version behavior.Compatibility, availability, legacy support, and cross-version behavior.area: hosting-bridgeSwiftUI bridge, UIHosting/NSHosting, representables, and platform host views.SwiftUI bridge, UIHosting/NSHosting, representables, and platform host views.area: renderingDisplayList, render backends, renderer hosts, drawing, and effects.DisplayList, render backends, renderer hosts, drawing, and effects.impact: visual-diffVisual mismatch, screenshot diff, or rendering fidelity issue.Visual mismatch, screenshot diff, or rendering fidelity issue.platform: iOSiOS-specific behavior or support.iOS-specific behavior or support.type: bugSomething is not working correctly.Something is not working correctly.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
rotationEffectcan build an incorrect UIKit hierarchy when using the OpenSwiftUI View Renderer.The DisplayList output contains the expected rotated content, but the rendered UIKit hierarchy differs from the SwiftUI-renderer path. The rotated graphics view is nested under an inherited wrapper and receives an unexpected frame, which causes visual mismatch.
Reproduction
Use a minimal stacked view with a rotated lower layer:
Run the example with the OpenSwiftUI View Renderer enabled.
Expected Behavior
The rotated red rectangle should render in the same position and hierarchy shape as the SwiftUI-renderer path.
The rotated graphics view should be placed directly under the hosting view with the expanded transformed frame and transform applied to that graphics view.
Actual Behavior
The DisplayList has the expected entries for both rectangles, but the OpenSwiftUI renderer hierarchy wraps the rotated graphics view in
_UIInheritedView.The nested
_UIGraphicsViewalso receives the absolute frame, so the view hierarchy no longer matches the SwiftUI-renderer path.Notes
The issue appears to be in OpenSwiftUI renderer hierarchy construction for transformed graphics content, not in DisplayList generation.
Log
OpenSwiftUI ViewRenderer
SwiftUI View Renderer