Skip to content

Commit dd35b51

Browse files
authored
Optimize code format (#293)
* Update EmptyViewRenderHost * Fix DerivedLayoutEngine format
1 parent 54ce5f0 commit dd35b51

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

Sources/OpenSwiftUICore/Layout/LayoutComputer/DerivedLayoutEngine.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
package import Foundation
99

1010
package protocol DerivedLayoutEngine: LayoutEngine {
11-
var base: LayoutComputer { get }
11+
var base: LayoutComputer { get }
1212
}
1313

1414
extension DerivedLayoutEngine {

Sources/OpenSwiftUICore/View/Graph/EmptyViewRendererHost.swift

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,46 @@
77

88
final package class EmptyViewRendererHost: ViewRendererHost {
99
package let viewGraph: ViewGraph
10+
1011
package var propertiesNeedingUpdate: ViewRendererHostProperties = []
12+
1113
package var renderingPhase: ViewRenderingPhase = .none
14+
1215
package var externalUpdateCount: Int = .zero
16+
1317
package var currentTimestamp: Time = .zero
18+
1419
package init(environment: EnvironmentValues = EnvironmentValues()) {
1520
Update.begin()
1621
viewGraph = ViewGraph(rootViewType: EmptyView.self, requestedOutputs: [])
1722
viewGraph.setEnvironment(environment)
1823
initializeViewGraph()
1924
Update.end()
2025
}
26+
2127
package func requestUpdate(after delay: Double) {}
28+
2229
package func updateRootView() {}
30+
2331
package func updateEnvironment() {}
32+
2433
package func updateSize() {}
34+
2535
package func updateSafeArea() {}
36+
2637
package func updateScrollableContainerSize() {}
27-
package func renderDisplayList(_ list: DisplayList, asynchronously: Bool, time: Time, nextTime: Time, targetTimestamp: Time?, version: DisplayList.Version, maxVersion: DisplayList.Version) -> Time {
38+
39+
package func renderDisplayList(
40+
_ list: DisplayList,
41+
asynchronously: Bool,
42+
time: Time,
43+
nextTime: Time,
44+
targetTimestamp: Time?,
45+
version: DisplayList.Version,
46+
maxVersion: DisplayList.Version
47+
) -> Time {
2848
.infinity
2949
}
50+
3051
package func forEachIdentifiedView(body: (_IdentifiedViewProxy) -> Void) {}
3152
}

0 commit comments

Comments
 (0)