Skip to content

Commit e274702

Browse files
committed
Fix PathData storage size
1 parent c6e6fbd commit e274702

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

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)