From 0a2fb6b5ec80b762ccc4a831e93aa55e204cd8f9 Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Fri, 19 Sep 2025 15:43:37 -0400 Subject: [PATCH 1/3] Merge more of the image attachments codebase duplicated between Darwin and Windows. This PR eliminates a bunch of duplicated code between Darwin and Windows that's used to support image attachments. We're able to do this because `_AttachableImageWrapper` is now a class and can be included in conforms-to generic constraints, so we can write `where AttachableValue: _AttachableImageWrapper & AttachableWrapper`. It was previously a structure and structures can't be used in generic constraints this way. There's a new public, underscored protocol introduced here, `_AttachableAsImage`, that serves as a "base" protocol for `AttachableAsCGImage` and `AttachableAsIWICBitmapSource`. I intend to promote this protocol to API, but it will need a Swift Evolution proposal first. I'm going to include it in a future "image attachments refinement" proposal that will cover a few other things. --- .../Attachments/AttachableAsCGImage.swift | 20 +--- .../_Testing_CoreGraphics/CMakeLists.txt | 1 - .../AttachableAsIWICBitmapSource.swift | 35 +----- ...achment+AttachableAsIWICBitmapSource.swift | 107 ------------------ ...Pointer+AttachableAsIWICBitmapSource.swift | 2 +- .../Overlays/_Testing_WinSDK/CMakeLists.txt | 1 - .../Attachment+_AttachableAsImage.swift} | 16 +-- .../Images/_AttachableAsImage.swift | 54 +++++++++ .../Images/_AttachableImageWrapper.swift | 12 +- Sources/Testing/CMakeLists.txt | 2 + 10 files changed, 69 insertions(+), 181 deletions(-) delete mode 100644 Sources/Overlays/_Testing_WinSDK/Attachments/Attachment+AttachableAsIWICBitmapSource.swift rename Sources/{Overlays/_Testing_CoreGraphics/Attachments/Attachment+AttachableAsCGImage.swift => Testing/Attachments/Images/Attachment+_AttachableAsImage.swift} (93%) create mode 100644 Sources/Testing/Attachments/Images/_AttachableAsImage.swift diff --git a/Sources/Overlays/_Testing_CoreGraphics/Attachments/AttachableAsCGImage.swift b/Sources/Overlays/_Testing_CoreGraphics/Attachments/AttachableAsCGImage.swift index 31427c9d7..96b93bad5 100644 --- a/Sources/Overlays/_Testing_CoreGraphics/Attachments/AttachableAsCGImage.swift +++ b/Sources/Overlays/_Testing_CoreGraphics/Attachments/AttachableAsCGImage.swift @@ -39,7 +39,7 @@ private import ImageIO /// @Available(Swift, introduced: 6.3) /// } @available(_uttypesAPI, *) -public protocol AttachableAsCGImage: SendableMetatype { +public protocol AttachableAsCGImage: _AttachableAsImage, SendableMetatype { /// An instance of `CGImage` representing this image. /// /// - Throws: Any error that prevents the creation of an image. @@ -68,22 +68,6 @@ public protocol AttachableAsCGImage: SendableMetatype { /// This property is not part of the public interface of the testing /// library. It may be removed in a future update. var _attachmentScaleFactor: CGFloat { get } - - /// Make a copy of this instance to pass to an attachment. - /// - /// - Returns: A copy of `self`, or `self` if no copy is needed. - /// - /// The testing library uses this function to take ownership of image - /// resources that test authors pass to it. If possible, make a copy of or add - /// a reference to `self`. If this type does not support making copies, return - /// `self` verbatim. - /// - /// The default implementation of this function when `Self` conforms to - /// `Sendable` simply returns `self`. - /// - /// This function is not part of the public interface of the testing library. - /// It may be removed in a future update. - func _copyAttachableValue() -> Self } @available(_uttypesAPI, *) @@ -95,6 +79,8 @@ extension AttachableAsCGImage { public var _attachmentScaleFactor: CGFloat { 1.0 } + + public func _deinitializeAttachableValue() {} } @available(_uttypesAPI, *) diff --git a/Sources/Overlays/_Testing_CoreGraphics/CMakeLists.txt b/Sources/Overlays/_Testing_CoreGraphics/CMakeLists.txt index fcd1d3459..567428150 100644 --- a/Sources/Overlays/_Testing_CoreGraphics/CMakeLists.txt +++ b/Sources/Overlays/_Testing_CoreGraphics/CMakeLists.txt @@ -11,7 +11,6 @@ if(APPLE) Attachments/_AttachableImageWrapper+AttachableWrapper.swift Attachments/AttachableAsCGImage.swift Attachments/AttachableImageFormat+UTType.swift - Attachments/Attachment+AttachableAsCGImage.swift Attachments/CGImage+AttachableAsCGImage.swift ReexportTesting.swift) diff --git a/Sources/Overlays/_Testing_WinSDK/Attachments/AttachableAsIWICBitmapSource.swift b/Sources/Overlays/_Testing_WinSDK/Attachments/AttachableAsIWICBitmapSource.swift index fdcad1809..96af7b670 100644 --- a/Sources/Overlays/_Testing_WinSDK/Attachments/AttachableAsIWICBitmapSource.swift +++ b/Sources/Overlays/_Testing_WinSDK/Attachments/AttachableAsIWICBitmapSource.swift @@ -113,7 +113,7 @@ public protocol _AttachableByAddressAsIWICBitmapSource { /// you have an image in another format that needs to be attached to a test, /// first convert it to an instance of one of the types above. @_spi(Experimental) -public protocol AttachableAsIWICBitmapSource: SendableMetatype { +public protocol AttachableAsIWICBitmapSource: _AttachableAsImage, SendableMetatype { /// Create a WIC bitmap source representing an instance of this type. /// /// - Returns: A pointer to a new WIC bitmap source representing this image. @@ -145,39 +145,6 @@ public protocol AttachableAsIWICBitmapSource: SendableMetatype { func _copyAttachableIWICBitmapSource( using factory: UnsafeMutablePointer ) throws -> UnsafeMutablePointer - - /// Make a copy of this instance. - /// - /// - Returns: A copy of `self`, or `self` if this type does not support a - /// copying operation. - /// - /// The testing library uses this function to take ownership of image - /// resources that test authors pass to it. If possible, make a copy of or add - /// a reference to `self`. If this type does not support making copies, return - /// `self` verbatim. - /// - /// The default implementation of this function when `Self` conforms to - /// `Sendable` simply returns `self`. - /// - /// This function is not part of the public interface of the testing library. - /// It may be removed in a future update. - func _copyAttachableValue() -> Self - - /// Manually deinitialize any resources associated with this image. - /// - /// The implementation of this function cleans up any resources (such as - /// handles or COM objects) associated with this image. The testing library - /// automatically invokes this function as needed. - /// - /// This function is not responsible for releasing the image returned from - /// `_copyAttachableIWICBitmapSource(using:)`. - /// - /// The default implementation of this function when `Self` conforms to - /// `Sendable` does nothing. - /// - /// This function is not part of the public interface of the testing library. - /// It may be removed in a future update. - func _deinitializeAttachableValue() } extension AttachableAsIWICBitmapSource { diff --git a/Sources/Overlays/_Testing_WinSDK/Attachments/Attachment+AttachableAsIWICBitmapSource.swift b/Sources/Overlays/_Testing_WinSDK/Attachments/Attachment+AttachableAsIWICBitmapSource.swift deleted file mode 100644 index 8068e7a8e..000000000 --- a/Sources/Overlays/_Testing_WinSDK/Attachments/Attachment+AttachableAsIWICBitmapSource.swift +++ /dev/null @@ -1,107 +0,0 @@ -// -// This source file is part of the Swift.org open source project -// -// Copyright (c) 2024 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for Swift project authors -// - -#if os(Windows) -@_spi(Experimental) public import Testing - -@_spi(Experimental) -extension Attachment { - /// Initialize an instance of this type that encloses the given image. - /// - /// - Parameters: - /// - image: A pointer to the value that will be attached to the output of - /// the test run. - /// - preferredName: The preferred name of the attachment when writing it - /// to a test report or to disk. If `nil`, the testing library attempts - /// to derive a reasonable filename for the attached value. - /// - imageFormat: The image format with which to encode `image`. - /// - sourceLocation: The source location of the call to this initializer. - /// This value is used when recording issues associated with the - /// attachment. - /// - /// You can attach instances of the following system-provided image types to a - /// test: - /// - /// | Platform | Supported Types | - /// |-|-| - /// | macOS | [`CGImage`](https://developer.apple.com/documentation/coregraphics/cgimage), [`CIImage`](https://developer.apple.com/documentation/coreimage/ciimage), [`NSImage`](https://developer.apple.com/documentation/appkit/nsimage) | - /// | iOS, watchOS, tvOS, and visionOS | [`CGImage`](https://developer.apple.com/documentation/coregraphics/cgimage), [`CIImage`](https://developer.apple.com/documentation/coreimage/ciimage), [`UIImage`](https://developer.apple.com/documentation/uikit/uiimage) | - /// | Windows | [`HBITMAP`](https://learn.microsoft.com/en-us/windows/win32/gdi/bitmaps), [`HICON`](https://learn.microsoft.com/en-us/windows/win32/menurc/icons), [`IWICBitmapSource`](https://learn.microsoft.com/en-us/windows/win32/api/wincodec/nn-wincodec-iwicbitmapsource) (including its subclasses declared by Windows Imaging Component) | - /// - /// The testing library uses the image format specified by `imageFormat`. Pass - /// `nil` to let the testing library decide which image format to use. If you - /// pass `nil`, then the image format that the testing library uses depends on - /// the path extension you specify in `preferredName`, if any. If you do not - /// specify a path extension, or if the path extension you specify doesn't - /// correspond to an image format the operating system knows how to write, the - /// testing library selects an appropriate image format for you. - public init( - _ image: T, - named preferredName: String? = nil, - as imageFormat: AttachableImageFormat? = nil, - sourceLocation: SourceLocation = #_sourceLocation - ) where T: AttachableAsIWICBitmapSource, AttachableValue == _AttachableImageWrapper { - let imageWrapper = _AttachableImageWrapper( - image: image._copyAttachableValue(), - imageFormat: imageFormat, - deinitializingWith: { $0._deinitializeAttachableValue() } - ) - self.init(imageWrapper, named: preferredName, sourceLocation: sourceLocation) - } - - /// Attach an image to the current test. - /// - /// - Parameters: - /// - image: The value to attach. - /// - preferredName: The preferred name of the attachment when writing it - /// to a test report or to disk. If `nil`, the testing library attempts - /// to derive a reasonable filename for the attached value. - /// - imageFormat: The image format with which to encode `image`. - /// - sourceLocation: The source location of the call to this initializer. - /// This value is used when recording issues associated with the - /// attachment. - /// - /// This function creates a new instance of ``Attachment`` wrapping `image` - /// and immediately attaches it to the current test. You can attach instances - /// of the following system-provided image types to a test: - /// - /// | Platform | Supported Types | - /// |-|-| - /// | macOS | [`CGImage`](https://developer.apple.com/documentation/coregraphics/cgimage), [`CIImage`](https://developer.apple.com/documentation/coreimage/ciimage), [`NSImage`](https://developer.apple.com/documentation/appkit/nsimage) | - /// | iOS, watchOS, tvOS, and visionOS | [`CGImage`](https://developer.apple.com/documentation/coregraphics/cgimage), [`CIImage`](https://developer.apple.com/documentation/coreimage/ciimage), [`UIImage`](https://developer.apple.com/documentation/uikit/uiimage) | - /// | Windows | [`HBITMAP`](https://learn.microsoft.com/en-us/windows/win32/gdi/bitmaps), [`HICON`](https://learn.microsoft.com/en-us/windows/win32/menurc/icons), [`IWICBitmapSource`](https://learn.microsoft.com/en-us/windows/win32/api/wincodec/nn-wincodec-iwicbitmapsource) (including its subclasses declared by Windows Imaging Component) | - /// - /// The testing library uses the image format specified by `imageFormat`. Pass - /// `nil` to let the testing library decide which image format to use. If you - /// pass `nil`, then the image format that the testing library uses depends on - /// the path extension you specify in `preferredName`, if any. If you do not - /// specify a path extension, or if the path extension you specify doesn't - /// correspond to an image format the operating system knows how to write, the - /// testing library selects an appropriate image format for you. - public static func record( - _ image: T, - named preferredName: String? = nil, - as imageFormat: AttachableImageFormat? = nil, - sourceLocation: SourceLocation = #_sourceLocation - ) where T: AttachableAsIWICBitmapSource, AttachableValue == _AttachableImageWrapper { - let attachment = Self(image, named: preferredName, as: imageFormat, sourceLocation: sourceLocation) - Self.record(attachment, sourceLocation: sourceLocation) - } -} - -@_spi(Experimental) -extension Attachment where AttachableValue: AttachableWrapper, AttachableValue.Wrapped: AttachableAsIWICBitmapSource { - /// The image format to use when encoding the represented image. - @_disfavoredOverload public var imageFormat: AttachableImageFormat? { - // FIXME: no way to express `where AttachableValue == _AttachableImageWrapper` on a property (see rdar://47559973) - (attachableValue as? _AttachableImageWrapper)?.imageFormat - } -} -#endif diff --git a/Sources/Overlays/_Testing_WinSDK/Attachments/UnsafeMutablePointer+AttachableAsIWICBitmapSource.swift b/Sources/Overlays/_Testing_WinSDK/Attachments/UnsafeMutablePointer+AttachableAsIWICBitmapSource.swift index 297e1f25a..43fe366c8 100644 --- a/Sources/Overlays/_Testing_WinSDK/Attachments/UnsafeMutablePointer+AttachableAsIWICBitmapSource.swift +++ b/Sources/Overlays/_Testing_WinSDK/Attachments/UnsafeMutablePointer+AttachableAsIWICBitmapSource.swift @@ -30,7 +30,7 @@ extension UnsafeMutablePointer: AttachableAsIWICBitmapSource where Pointee: _Att Pointee._copyAttachableValue(at: self) } - public consuming func _deinitializeAttachableValue() { + public func _deinitializeAttachableValue() { Pointee._deinitializeAttachableValue(at: self) } } diff --git a/Sources/Overlays/_Testing_WinSDK/CMakeLists.txt b/Sources/Overlays/_Testing_WinSDK/CMakeLists.txt index a1df6bd60..1b56f0a8d 100644 --- a/Sources/Overlays/_Testing_WinSDK/CMakeLists.txt +++ b/Sources/Overlays/_Testing_WinSDK/CMakeLists.txt @@ -11,7 +11,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") Attachments/_AttachableImageWrapper+AttachableWrapper.swift Attachments/AttachableAsIWICBitmapSource.swift Attachments/AttachableImageFormat+CLSID.swift - Attachments/Attachment+AttachableAsIWICBitmapSource.swift Attachments/HBITMAP+AttachableAsIWICBitmapSource.swift Attachments/HICON+AttachableAsIWICBitmapSource.swift Attachments/IWICBitmapSource+AttachableAsIWICBitmapSource.swift diff --git a/Sources/Overlays/_Testing_CoreGraphics/Attachments/Attachment+AttachableAsCGImage.swift b/Sources/Testing/Attachments/Images/Attachment+_AttachableAsImage.swift similarity index 93% rename from Sources/Overlays/_Testing_CoreGraphics/Attachments/Attachment+AttachableAsCGImage.swift rename to Sources/Testing/Attachments/Images/Attachment+_AttachableAsImage.swift index 65d90b11a..6ac3ccc29 100644 --- a/Sources/Overlays/_Testing_CoreGraphics/Attachments/Attachment+AttachableAsCGImage.swift +++ b/Sources/Testing/Attachments/Images/Attachment+_AttachableAsImage.swift @@ -8,9 +8,6 @@ // See https://swift.org/CONTRIBUTORS.txt for Swift project authors // -#if SWT_TARGET_OS_APPLE && canImport(CoreGraphics) -public import Testing - @available(_uttypesAPI, *) extension Attachment { /// Initialize an instance of this type that encloses the given image. @@ -52,12 +49,8 @@ extension Attachment { named preferredName: String? = nil, as imageFormat: AttachableImageFormat? = nil, sourceLocation: SourceLocation = #_sourceLocation - ) where T: AttachableAsCGImage, AttachableValue == _AttachableImageWrapper { - let imageWrapper = _AttachableImageWrapper( - image: image._copyAttachableValue(), - imageFormat: imageFormat, - deinitializingWith: { _ in } - ) + ) where AttachableValue: _AttachableImageWrapper & AttachableWrapper { + let imageWrapper = AttachableValue(image: image, imageFormat: imageFormat) self.init(imageWrapper, named: preferredName, sourceLocation: sourceLocation) } @@ -99,7 +92,7 @@ extension Attachment { named preferredName: String? = nil, as imageFormat: AttachableImageFormat? = nil, sourceLocation: SourceLocation = #_sourceLocation - ) where T: AttachableAsCGImage, AttachableValue == _AttachableImageWrapper { + ) where AttachableValue: _AttachableImageWrapper & AttachableWrapper { let attachment = Self(image, named: preferredName, as: imageFormat, sourceLocation: sourceLocation) Self.record(attachment, sourceLocation: sourceLocation) } @@ -109,11 +102,10 @@ extension Attachment { @_spi(Experimental) // STOP: not part of ST-0014 @available(_uttypesAPI, *) -extension Attachment where AttachableValue: AttachableWrapper, AttachableValue.Wrapped: AttachableAsCGImage { +extension Attachment where AttachableValue: AttachableWrapper, AttachableValue.Wrapped: _AttachableAsImage { /// The image format to use when encoding the represented image. @_disfavoredOverload public var imageFormat: AttachableImageFormat? { // FIXME: no way to express `where AttachableValue == _AttachableImageWrapper` on a property (see rdar://47559973) (attachableValue as? _AttachableImageWrapper)?.imageFormat } } -#endif diff --git a/Sources/Testing/Attachments/Images/_AttachableAsImage.swift b/Sources/Testing/Attachments/Images/_AttachableAsImage.swift new file mode 100644 index 000000000..6954600eb --- /dev/null +++ b/Sources/Testing/Attachments/Images/_AttachableAsImage.swift @@ -0,0 +1,54 @@ +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2024–2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for Swift project authors +// + +/// A protocol describing images that can be converted to instances of +/// [`Attachment`](https://developer.apple.com/documentation/testing/attachment). +/// +/// This protocol acts as an abstract, platform-independent base protocol for +/// ``AttachableAsCGImage`` and ``AttachableAsIWICBitmapSource``. +/// +/// @Comment { +/// A future Swift Evolution proposal will promote this protocol to API so +/// that we don't need to underscore its name. +/// } +@available(_uttypesAPI, *) +public protocol _AttachableAsImage: SendableMetatype { + /// Make a copy of this instance to pass to an attachment. + /// + /// - Returns: A copy of `self`, or `self` if no copy is needed. + /// + /// The testing library uses this function to take ownership of image + /// resources that test authors pass to it. If possible, make a copy of or add + /// a reference to `self`. If this type does not support making copies, return + /// `self` verbatim. + /// + /// The default implementation of this function when `Self` conforms to + /// `Sendable` simply returns `self`. + /// + /// This function is not part of the public interface of the testing library. + /// It may be removed in a future update. + func _copyAttachableValue() -> Self + + /// Manually deinitialize any resources associated with this image. + /// + /// The implementation of this function cleans up any resources (such as + /// handles or COM objects) associated with this image. The testing library + /// automatically invokes this function as needed. + /// + /// This function is not responsible for releasing the image returned from + /// `_copyAttachableIWICBitmapSource(using:)`. + /// + /// The default implementation of this function when `Self` conforms to + /// `Sendable` does nothing. + /// + /// This function is not part of the public interface of the testing library. + /// It may be removed in a future update. + func _deinitializeAttachableValue() +} diff --git a/Sources/Testing/Attachments/Images/_AttachableImageWrapper.swift b/Sources/Testing/Attachments/Images/_AttachableImageWrapper.swift index 25e102677..4fe2e84a6 100644 --- a/Sources/Testing/Attachments/Images/_AttachableImageWrapper.swift +++ b/Sources/Testing/Attachments/Images/_AttachableImageWrapper.swift @@ -21,24 +21,20 @@ /// | Windows | [`HBITMAP`](https://learn.microsoft.com/en-us/windows/win32/gdi/bitmaps), [`HICON`](https://learn.microsoft.com/en-us/windows/win32/menurc/icons), [`IWICBitmapSource`](https://learn.microsoft.com/en-us/windows/win32/api/wincodec/nn-wincodec-iwicbitmapsource) (including its subclasses declared by Windows Imaging Component) | /// } @available(_uttypesAPI, *) -public final class _AttachableImageWrapper: Sendable { +public final class _AttachableImageWrapper: Sendable where Image: _AttachableAsImage { /// The underlying image. private nonisolated(unsafe) let _image: Image /// The image format to use when encoding the represented image. package let imageFormat: AttachableImageFormat? - /// A deinitializer function to call to clean up `image`. - private let _deinit: @Sendable (consuming Image) -> Void - - package init(image: Image, imageFormat: AttachableImageFormat?, deinitializingWith `deinit`: @escaping @Sendable (consuming Image) -> Void) { - self._image = image + init(image: Image, imageFormat: AttachableImageFormat?) { + self._image = image._copyAttachableValue() self.imageFormat = imageFormat - self._deinit = `deinit` } deinit { - _deinit(_image) + _image._deinitializeAttachableValue() } } diff --git a/Sources/Testing/CMakeLists.txt b/Sources/Testing/CMakeLists.txt index a88dd4084..9776f70d3 100644 --- a/Sources/Testing/CMakeLists.txt +++ b/Sources/Testing/CMakeLists.txt @@ -21,8 +21,10 @@ add_library(Testing ABI/Encoded/ABI.EncodedIssue.swift ABI/Encoded/ABI.EncodedMessage.swift ABI/Encoded/ABI.EncodedTest.swift + Attachments/Images/_AttachableAsImage.swift Attachments/Images/_AttachableImageWrapper.swift Attachments/Images/AttachableImageFormat.swift + Attachments/Images/Attachment+_AttachableAsImage.swift Attachments/Images/ImageAttachmentError.swift Attachments/Attachable.swift Attachments/AttachableWrapper.swift From 6f98336e3fc807e69ca122d6af2f6931c20cda23 Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Fri, 19 Sep 2025 16:08:59 -0400 Subject: [PATCH 2/3] Fix conformance --- .../UnsafeMutablePointer+AttachableAsIWICBitmapSource.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Overlays/_Testing_WinSDK/Attachments/UnsafeMutablePointer+AttachableAsIWICBitmapSource.swift b/Sources/Overlays/_Testing_WinSDK/Attachments/UnsafeMutablePointer+AttachableAsIWICBitmapSource.swift index 43fe366c8..a8b0a6312 100644 --- a/Sources/Overlays/_Testing_WinSDK/Attachments/UnsafeMutablePointer+AttachableAsIWICBitmapSource.swift +++ b/Sources/Overlays/_Testing_WinSDK/Attachments/UnsafeMutablePointer+AttachableAsIWICBitmapSource.swift @@ -13,7 +13,7 @@ private import Testing public import WinSDK @_spi(Experimental) -extension UnsafeMutablePointer: AttachableAsIWICBitmapSource where Pointee: _AttachableByAddressAsIWICBitmapSource { +extension UnsafeMutablePointer: _AttachableAsImage, AttachableAsIWICBitmapSource where Pointee: _AttachableByAddressAsIWICBitmapSource { public func copyAttachableIWICBitmapSource() throws -> UnsafeMutablePointer { let factory = try IWICImagingFactory.create() defer { From 67ce00c73748203c127de814c69dbc0de8cbbe7c Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Mon, 22 Sep 2025 16:01:48 -0400 Subject: [PATCH 3/3] Remove redundant default implementations on Windows --- .../Attachments/AttachableAsIWICBitmapSource.swift | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Sources/Overlays/_Testing_WinSDK/Attachments/AttachableAsIWICBitmapSource.swift b/Sources/Overlays/_Testing_WinSDK/Attachments/AttachableAsIWICBitmapSource.swift index 96af7b670..60d2e28b8 100644 --- a/Sources/Overlays/_Testing_WinSDK/Attachments/AttachableAsIWICBitmapSource.swift +++ b/Sources/Overlays/_Testing_WinSDK/Attachments/AttachableAsIWICBitmapSource.swift @@ -154,12 +154,4 @@ extension AttachableAsIWICBitmapSource { try copyAttachableIWICBitmapSource() } } - -extension AttachableAsIWICBitmapSource where Self: Sendable { - public func _copyAttachableValue() -> Self { - self - } - - public func _deinitializeAttachableValue() {} -} #endif