diff --git a/Sources/Screen/ChromaKeyProcessor.swift b/Sources/Screen/ChromaKeyProcessor.swift index d6ed4cbec..c8429b8b1 100644 --- a/Sources/Screen/ChromaKeyProcessor.swift +++ b/Sources/Screen/ChromaKeyProcessor.swift @@ -2,8 +2,8 @@ import Accelerate import Foundation import simd -/// A type with a chroma key processorble screen object. -public protocol ChromaKeyProcessorble { +/// A marker type with a chroma key processable screen object. +public protocol ChromaKeyProcessable { /// Specifies the chroma key color. var chromaKeyColor: CGColor? { get set } } diff --git a/Sources/Screen/ScreenObject.swift b/Sources/Screen/ScreenObject.swift index 9635385cb..ee55613a3 100644 --- a/Sources/Screen/ScreenObject.swift +++ b/Sources/Screen/ScreenObject.swift @@ -197,7 +197,7 @@ public final class ImageScreenObject: ScreenObject { } /// An object that manages offscreen rendering a video track source. -public final class VideoTrackScreenObject: ScreenObject, ChromaKeyProcessorble { +public final class VideoTrackScreenObject: ScreenObject, ChromaKeyProcessable { public var chromaKeyColor: CGColor? /// Specifies the track number how the displays the visual content. @@ -386,7 +386,7 @@ public final class TextScreenObject: ScreenObject { #if !os(visionOS) /// An object that manages offscreen rendering an asset resource. -public final class AssetScreenObject: ScreenObject, ChromaKeyProcessorble { +public final class AssetScreenObject: ScreenObject, ChromaKeyProcessable { public var chromaKeyColor: CGColor? public var isReading: Bool { diff --git a/Sources/Screen/ScreenRenderer.swift b/Sources/Screen/ScreenRenderer.swift index 8bd97c725..99b54c95a 100644 --- a/Sources/Screen/ScreenRenderer.swift +++ b/Sources/Screen/ScreenRenderer.swift @@ -136,7 +136,7 @@ final class ScreenRendererByCPU: ScreenRenderer { vImageOverwriteChannels_ARGB8888(&mask, &buffer, &buffer, 0x8, Self.noFlags) } } else { - if let screenObject = screenObject as? (any ChromaKeyProcessorble), + if let screenObject = screenObject as? (any ChromaKeyProcessable), let chromaKeyColor = screenObject.chromaKeyColor, var mask = try choromaKeyProcessor?.makeMask(&buffer, chromeKeyColor: chromaKeyColor) { vImageOverwriteChannels_ARGB8888(&mask, &buffer, &buffer, 0x8, Self.noFlags)