0a28454579
* Revert "feat: Skia for Android (#1731)"
This reverts commit a7c137da07
.
* Remove some skia
* Remove all the Skia stuff.
* Update useFrameProcessor.ts
* Update lockfiles
* fix: Use native Preview again
* Use `OpenGLTexture&` again
* Remove `PreviewOutput` (we use `SurfaceView` in parallel)
* fix: Log photo widths
* fix: Fix cpplint
33 lines
779 B
Swift
33 lines
779 B
Swift
//
|
|
// CameraView+Preview.swift
|
|
// VisionCamera
|
|
//
|
|
// Created by Marc Rousavy on 20.07.23.
|
|
// Copyright © 2023 mrousavy. All rights reserved.
|
|
//
|
|
|
|
import AVFoundation
|
|
import Foundation
|
|
|
|
extension CameraView {
|
|
public func setupPreviewView() {
|
|
previewView?.removeFromSuperview()
|
|
previewView = NativePreviewView(frame: frame, session: captureSession)
|
|
addSubview(previewView!)
|
|
}
|
|
|
|
internal func setupFpsGraph() {
|
|
#if DEBUG
|
|
if enableFpsGraph {
|
|
if fpsGraph != nil { return }
|
|
fpsGraph = RCTFPSGraph(frame: CGRect(x: 10, y: 54, width: 75, height: 45), color: .red)
|
|
fpsGraph!.layer.zPosition = 9999.0
|
|
addSubview(fpsGraph!)
|
|
} else {
|
|
fpsGraph?.removeFromSuperview()
|
|
fpsGraph = nil
|
|
}
|
|
#endif
|
|
}
|
|
}
|