Skip to content

Commit 0d222b7

Browse files
authored
Fix PathData storage size (#709)
1 parent c6e6fbd commit 0d222b7

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Example/OpenSwiftUIUITests/View/DynamicViewContent/ForEachUITests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ struct ForEachUITests {
165165
}
166166
}
167167
}
168-
openSwiftUIAssertAnimationSnapshot(of: ContentView())
168+
withKnownIssue(isIntermittent: true) {
169+
openSwiftUIAssertAnimationSnapshot(of: ContentView())
170+
}
169171
}
170172
}

Example/OpenSwiftUIUITests/View/ToggleUITests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ struct ToggleUITests {
1919
}
2020
}
2121
#if os(iOS) || os(visionOS)
22-
openSwiftUIAssertSnapshot(of: ContentView())
22+
withKnownIssue(isIntermittent: true) {
23+
openSwiftUIAssertSnapshot(of: ContentView())
24+
}
2325
#else
2426
withKnownIssue("checkBox style is not supported yet") {
2527
openSwiftUIAssertSnapshot(of: ContentView())

Sources/OpenSwiftUICore/Shape/PathData.swift

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ package import OpenRenderBoxShims
1010
// MARK: - PathData
1111

1212
/// A union-like structure matching the C PathData union layout.
13-
/// Size: 0x70 (112) bytes to match the buffer size.
13+
/// Size: 0x60 (96) bytes to match the buffer size.
1414
///
1515
/// C definition:
1616
///
1717
/// typedef union PathData {
1818
/// CGPathRef cgPath; // 8 bytes (pointer)
1919
/// ORBPath rbPath; // 16 bytes (2 pointers)
20-
/// uint8_t buffer[0x70]; // 112 bytes
20+
/// uint8_t buffer[0x60]; // 96 bytes
2121
/// } PathData;
2222
package struct PathData {
23-
// 112 bytes of raw storage (0x70)
23+
// 96 bytes of raw storage (0x60)
2424
package typealias Buffer = (
2525
UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8,
2626
UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8,
@@ -33,8 +33,6 @@ package struct PathData {
3333
UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8,
3434
UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8,
3535
UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8,
36-
UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8,
37-
UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8,
3836
UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8
3937
)
4038

@@ -51,8 +49,6 @@ package struct PathData {
5149
0, 0, 0, 0, 0, 0, 0, 0,
5250
0, 0, 0, 0, 0, 0, 0, 0,
5351
0, 0, 0, 0, 0, 0, 0, 0,
54-
0, 0, 0, 0, 0, 0, 0, 0,
55-
0, 0, 0, 0, 0, 0, 0, 0
5652
)
5753

5854
package init() {}

Sources/OpenSwiftUI_SPI/Util/PathData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ typedef union PathData {
3232
#else
3333
ORBPath rbPath;
3434
#endif
35-
uint8_t buffer[0x70];
35+
uint8_t buffer[0x60];
3636
} PathData;
3737

3838
OPENSWIFTUI_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)