Skip to content

Commit 1ad8cd9

Browse files
committed
perf(transitions): show background capture while in full-screen webcam transition mode
1 parent 365fc3c commit 1ad8cd9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Reframed/Compositor/CameraVideoCompositor.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ final class CameraVideoCompositor: NSObject, AVVideoCompositing, @unchecked Send
418418
drawRect = aspectFillRect(imageSize: virtualSize, in: fullRect)
419419
}
420420
context.saveGState()
421-
drawBackground(in: context, rect: fullRect, instruction: instruction, colorSpace: colorSpace)
421+
if regionTransition == nil || regionTransition!.type == .none {
422+
drawBackground(in: context, rect: fullRect, instruction: instruction, colorSpace: colorSpace)
423+
}
422424
context.clip(to: fullRect)
423425
if instruction.cameraMirrored {
424426
context.translateBy(x: drawRect.midX, y: 0)

Reframed/Editor/VideoPreviewView.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,9 @@ final class VideoPreviewContainer: NSView {
620620
}
621621

622622
webcamWrapper.layer?.shadowOpacity = 0
623-
screenContainerLayer.isHidden = true
624-
cursorOverlay.isHidden = true
623+
let fsTransitioning = hasActiveTransition
624+
screenContainerLayer.isHidden = !fsTransitioning
625+
cursorOverlay.isHidden = !fsTransitioning
625626
webcamWrapper.frame = canvasRect
626627
webcamView.frame = webcamWrapper.bounds
627628
webcamView.layer?.cornerRadius = 0

0 commit comments

Comments
 (0)