Skip to content

Commit 25d72f9

Browse files
committed
Fix linux build issue
1 parent f2f84d3 commit 25d72f9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Sources/OpenSwiftUICore/Render/PlatformDrawable.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
// Audited for 6.5.4
66
// Status: WIP
77

8-
public import CoreGraphics
9-
public import QuartzCore
108
import OpenAttributeGraphShims
119
import OpenRenderBoxShims
10+
public import OpenCoreGraphicsShims
11+
#if canImport(QuarzCore)
12+
public import QuartzCore
1213
import CoreAnimation_Private
14+
#endif
1315

1416
// MARK: - PlatformDrawable
1517

@@ -22,12 +24,14 @@ public protocol PlatformDrawable: AnyObject {
2224

2325
func update(content: PlatformDrawableContent?, required: Bool) -> Bool
2426

27+
#if canImport(QuarzCore)
2528
func makeAsyncUpdate(
2629
content: PlatformDrawableContent,
2730
required: Bool,
2831
layer: CALayer,
2932
bounds: CGRect
3033
) -> (() -> Void)?
34+
#endif
3135

3236
func setContentsScale(_ scale: CGFloat)
3337

@@ -124,6 +128,7 @@ public struct PlatformDrawableOptions: Equatable, Sendable {
124128
base.rendersFirstFrameAsynchronously
125129
}
126130

131+
#if canImport(QuarzCore)
127132
public var caLayerContentsFormat: CALayerContentsFormat {
128133
var format = CALayerContentsFormat.automatic
129134
if base.flags.contains(.rgbaContext) {
@@ -134,6 +139,7 @@ public struct PlatformDrawableOptions: Equatable, Sendable {
134139
}
135140
return format
136141
}
142+
#endif
137143

138144
public func update(rbLayer: AnyObject) {
139145
// TODO: RBLayer

0 commit comments

Comments
 (0)